Bandwidth adjustment method and apparatus, electronic device, and computer-readable storage medium

ABSTRACT

Embodiments of the present application provide a method and apparatus for bandwidth adjustment, an electronic device and a computer-readable storage medium. The method comprise obtaining an overload node; determining whether an overload bandwidth of the overload node is greater than a total available bandwidth amount of all target nodes for the overload node; if not, determining the overload node as a to-be-adjusted node and determining a to-be-adjusted bandwidth amount of the to-be-adjusted node based on the overloaded bandwidth of the overload node; decreasing a total carrying bandwidth amount of the to-be-adjusted node by the to-be-adjusted bandwidth amount corresponding to the to-be-adjusted node, and increasing a total target carrying bandwidth amount of the to-be-adjusted node by the to-be-adjusted bandwidth amount corresponding to the to-be-adjusted node. By applying the method provided by the embodiments of the present application, the bandwidth can be adjusted more accurately.

The present application is based on, and claims the priority to aChinese patent application No. 201810077039.1 filed with the ChinaNational Intellectual Property Administration on Jan. 26, 2018 andentitled “Bandwidth Adjustment Method and Apparatus, Electronic Deviceand Computer-Readable Storage Medium”, which is incorporated herein byreference in its entirety.

TECHNICAL FIELD

The present application relates to the field of Internet technology, andin particular, to a method and apparatus for bandwidth adjustment, anelectronic device, and a computer-readable storage medium.

BACKGROUND

The basic principle behind CDN (Content Delivery Network) is to avoidbottlenecks and links on Internet as much as possible that may affectthe speed and stability of data transmission, to make contenttransmission faster and more stable. The CDN can redirect a user'srequest to a node closest to the user in real time based oncomprehensive information such as a network traffic, a connection andload status of each node, a distance of each node to the user, andresponse time of each node and the like, by disposing an intelligentvirtual network composed of CDN nodes (hereinafter referred to as nodes)on the existing Internet. The purpose is to enable the user to obtainthe required content from the node closest to the user, solve thesituation of Internet congestion, and improve the response speed whenthe user accesses to the Internet.

The basis for redirecting a user's request to a node closest to the useris to allocate a carrying bandwidth to each node in each scheduling unitso that the node can process the user's request. It should be noted thata link of a domain name is called a scheduling unit, that is, ascheduling unit is determined by a domain name and a link. The way toallocate carrying bandwidth to a node is to determine a ratio ofcarrying bandwidths of nodes in a scheduling unit, which is determinedbased on the number of virtual IP addresses of the nodes; and toallocate the total bandwidth carried by the scheduling unit to the nodesaccording to the determined ratio. For example, the scheduling unit 1includes nodes A, B, and C, and five virtual IP addresses are assignedto each of the nodes A, B, and C in advance. The ratio of the carryingbandwidths of the nodes A, B, and C is 1:1:1. The total carryingbandwidth of the scheduling unit 1 is 60 G. Thus, the carrying bandwidthallocated to each of the nodes A, B, and C is 20 G.

In case a large number of user's requests are directed to a same node,the node will be overloaded. At this time, the carrying bandwidth of theoverload node may be adjusted to prevent the overload node from failingdue to heavy load. The way to adjust a carrying bandwidth of a node isto readjust the allocation ratio of the carrying bandwidths of the nodesand allocate the total bandwidth carried by the scheduling unit to thenodes according to the adjusted ratio. Specifically, a proportion of acarrying bandwidth of an overload node is decreased. After one of thevirtual IP addresses of the overload node is removed, the allocationratio of the carrying bandwidths of the nodes is determined, and then itis determined whether the difference between the carrying bandwidthcurrently allocated to the overload node and the carrying bandwidthpreviously allocated to the overload node is greater than an overloadbandwidth of the overload node. If the difference is greater than theoverload bandwidth of the overload node, the adjustment of the overloadnode ends; if the difference is less than or equal to the overloadbandwidth of the overload node, then it is returned to the step ofremoving one of the virtual IP addresses of the overload node. Forexample, an amount of overload of the node A is 2 G. Since the carryingbandwidths of the nodes A, B, and C are determined based on the ratio ofthe number of virtual IP addresses of the nodes, it is not possible todecrease the carrying bandwidth of the node A in the scheduling unit 1by 2 G and to increase the total carrying bandwidth of the nodes B and Cin the scheduling unit 1 by 2 G. Instead, one virtual IP address of thenode A is deleted, and the allocation ratio of the carrying bandwidthsof the nodes A, B, and C are re-determined. The re-determined allocationratio of the carrying bandwidths of the nodes A, B, and C is 4:5:5. Atthis time, the carrying bandwidth of the node A is 17.1 G, and thecarrying bandwidth of each of the nodes B and C is 21.4 G. Thus, thecarrying bandwidth of the node A is decreased by 2.9 G. It can be seenthat the way to adjust the bandwidths based on the ratio determined bythe number of virtual IP addresses will cause co-constraints between thecarrying bandwidths of the nodes, resulting in a coarser adjustmentgranularity and thus inaccurate bandwidth adjustment.

SUMMARY

The objective of the embodiments of the present application is toprovide a method and apparatus for bandwidth adjustment, an electronicdevice, and a computer-readable storage medium, to adjust the bandwidthaccurately. Specific technical solutions are as follows.

In a first aspect, in order to achieve the foregoing objective, anembodiment of the present application provides a method for bandwidthadjustment, comprising: obtaining an overload node, wherein the overloadnode is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the overload node;determining whether an overload bandwidth of the overload node isgreater than a total current available bandwidth amount of a targetnode(s) for the overload node, wherein the overload bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset first bandwidth threshold correspondingto the overload node; the target node(s) for the overload node is anode(s) whose total used bandwidth amount is less than the preset firstbandwidth threshold corresponding to the overload node in all schedulingunits including the overload node; when the overload bandwidth of theoverload node is less than or equal to the total current availablebandwidth amount of the target node(s) for the overload node,determining the overload node as a to-be-adjusted node and determining ato-be-adjusted bandwidth amount of the to-be-adjusted node; decreasing atotal carrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, and increasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, wherein the total target carrying bandwidthamount of the to-be-adjusted node is a sum of current carryingbandwidth(s) of the target node(s) for the to-be-adjusted node; anincrease carrying bandwidth amount of the target node(s) in a schedulingunit is less than or equal to an available bandwidth of the targetnode(s) in the scheduling unit, and the increase carrying bandwidthamount of the target node(s) in the scheduling unit is less than orequal to the to-be-adjusted bandwidth amount of the to-be-adjusted node.

In a second aspect, an embodiment of the present application provides anapparatus for bandwidth adjustment, comprising: an obtaining moduleconfigured for obtaining an overload node, wherein the overload node isa node whose total used bandwidth amount is greater than a preset firstbandwidth threshold corresponding to the overload node; a first judgingmodule, configured for determining whether an overload bandwidth of theoverload node is greater than a total current available bandwidth amountof a target node(s) for the overload node, wherein the overloadbandwidth of the overload node is a difference between the total usedbandwidth amount of the overload node and the preset first bandwidththreshold corresponding to the overload node; the target node(s) for theoverload node is a node(s) whose total used bandwidth amount is lessthan the preset first bandwidth threshold corresponding to the overloadnode in all scheduling units including the overload node; a determiningmodule, configured for when the overload bandwidth of the overload nodeis less than or equal to the total current available bandwidth amount ofthe target node(s) for the overload node, determining the overload nodeas a to-be-adjusted node and determining a to-be-adjusted bandwidthamount of the to-be-adjusted node; a first adjusting module, configuredfor decreasing a total carrying bandwidth amount of the to-be-adjustednode by the to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node, and increasing a total target carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, wherein the total targetcarrying bandwidth amount of the to-be-adjusted node is a sum of currentcarrying bandwidth(s) of the target node(s) for the to-be-adjusted node;an increase carrying bandwidth amount of the target node(s) in ascheduling unit is less than or equal to an available bandwidth of thetarget node(s) in the scheduling unit, and the increase carryingbandwidth amount of the target node(s) in the scheduling unit is lessthan or equal to the to-be-adjusted bandwidth amount of theto-be-adjusted node.

In a third aspect, in order to achieve the foregoing objective, anembodiment of the present application provides an electronic devicecomprising a processor and a memory, wherein the memory is configured tostore a computer program; the processor is configured to execute theprogram stored in the memory to perform any one of the above methods forbandwidth adjustment.

In a fourth aspect, in order to achieve the foregoing objective, anembodiment of the present application provides a computer-readablestorage medium storing a computer program thereon, wherein the computerprogram is executed by a processor so as to cause the processor toperform any one of the above methods for bandwidth adjustment.

In a fifth aspect, an embodiment of the present application provides acomputer program product, which is executed on a computer so as to causethe computer to perform any one of the above methods for bandwidthadjustment.

In a sixth aspect, an embodiment of the present application provide acomputer program, which is executed on a computer so as to cause thecomputer to perform any one of the above methods for bandwidthadjustment.

The method and apparatus for bandwidth adjustment, the electronic deviceand the computer-readable storage medium provided by the embodiments ofthe present application may determine the to-be-adjusted bandwidthamount of the overload node according to the overload bandwidth amountof the overload node; and when the overload bandwidth of the overloadnode is less than or equal to the total available bandwidth amount ofthe target nodes for the overload node, decrease the total carryingbandwidth amount of the overload node, and increase the sum of thecarrying bandwidths of all target nodes. Compared with the case wherethe carrying bandwidths of the overload node and the target nodes needto be adjusted proportionally in the existing technologies, in theembodiments of the present application, the carrying bandwidths of theoverload node and the target nodes may not be adjusted proportionally.Instead, the total carrying bandwidth amount of the overload node isdecreased by the corresponding to-be-adjusted bandwidth amount, and thetotal carrying bandwidth amount of the target nodes is increased by thecorresponding to-be-adjusted bandwidth amount. Therefore, bandwidthadjustment of the present application is more accurate compared with theexisting technologies. Of course, any product or method of the presentapplication does not necessarily achieve all the above advantagessimultaneously.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to more clearly describe the technical solutions of theembodiments of the present application or of the existing technologies,drawings that need to be used in embodiments and the existingtechnologies will be briefly described below. The drawings providedbelow are for only some embodiments of the present application; thoseskilled in the art can also obtain other drawings based on thesedrawings without any creative efforts.

FIG. 1 is a first flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 2 is a second flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 3 is a third flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 4 is a fourth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 5 is a fifth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 6 is a sixth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 7 is a seventh flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 8 is a structural diagram of an apparatus for bandwidth adjustmentaccording to an embodiment of the present application;

FIG. 9 is a structural diagram of an electronic device according to anembodiment of the present application.

DETAILED DESCRIPTION OF THE INVENTION

In order to make the objectives, technical solutions, and advantages ofthe present application clearer and more understandable, the presentapplication will be described in more detail below with reference to theappended drawings and embodiments. The described embodiments are onlysome, and not all, of the embodiments of the present application. Allother embodiments obtained based on the embodiments of the presentapplication by those skilled in the art without any creative effortsfall into the scope of protection defined by the present application.

In order to solve the problem in the existing technologies, embodimentsof the present application provide a method and apparatus for bandwidthadjustment, an electronic device, and a computer-readable storagemedium. The method for bandwidth adjustment provided by an embodiment ofthe present application will be described below in detail.

In order to achieve accurate bandwidth adjustment, embodiments of thepresent application provide a method and apparatus for bandwidthadjustment, an electronic device and a computer-readable storage medium.

In a first aspect, a method for bandwidth adjustment provided by anembodiment of the present application is described in detail. The methodfor bandwidth adjustment may include the following steps A1-A4.

A1, obtaining an overload node, wherein the overload node is a nodewhose total used bandwidth amount is greater than a preset firstbandwidth threshold corresponding to the overload node.

In a practical application, there may be one or more overload nodes. Thenumber of overload nodes is not specifically limited in the embodimentof the present invention.

A2, determining whether an overload bandwidth of the overload node isgreater than a total current available bandwidth amount of a targetnode(s) for the overload node, wherein the overload bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset first bandwidth threshold correspondingto the overload node; the target node(s) for the overload node is anode(s) whose total used bandwidth amount is less than the preset firstbandwidth threshold corresponding to the overload node in all schedulingunits including the overload node.

A3, when the overload bandwidth of the overload node is less than orequal to the total current available bandwidth amount of the targetnode(s) for the overload node, determining the overload node as ato-be-adjusted node and determining a to-be-adjusted bandwidth amount ofthe to-be-adjusted node;

A4, decreasing a total carrying bandwidth amount of the to-be-adjustednode by the to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node, and increasing a total target carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, wherein the total targetcarrying bandwidth amount of the to-be-adjusted node is a sum of currentcarrying bandwidth(s) of the target node(s) for the to-be-adjusted node;an increase carrying bandwidth amount of the target node(s) in ascheduling unit is less than or equal to an available bandwidth of thetarget node(s) in the scheduling unit, and the increase carryingbandwidth amount of the target node(s) in the scheduling unit is lessthan or equal to the to-be-adjusted bandwidth amount of theto-be-adjusted node.

In an implementation, the step of decreasing a total carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjusted nodecomprises:

determining whether the to-be-adjusted node meets a target condition,wherein the target condition is that the overload bandwidth of theto-be-adjusted node is less than a first preset threshold correspondingto the to-be-adjusted node, and the total available bandwidth amount ofthe target node(s) for the to-be-adjusted node is greater than a secondpreset threshold corresponding to the to-be-adjusted node, wherein thesecond preset threshold is greater than the first preset threshold;

when the to-be-adjusted node meets the target condition, selecting onetarget scheduling unit whose total available bandwidth amount is greaterthan the to-be-adjusted bandwidth amount of the to-be-adjusted node fromall target scheduling units as a first scheduling unit, wherein thetarget scheduling units are scheduling units including theto-be-adjusted node;

decreasing a carrying bandwidth of the to-be-adjusted node in the firstscheduling unit by the to-be-adjusted bandwidth amount corresponding tothe to-be-adjusted node; and

increasing a total carrying bandwidth amount of the target node(s) inthe first scheduling unit by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node.

In an implementation, when the to-be-adjusted node does not meet thetarget condition, the step of decreasing a total carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjusted nodecomprises:

determining whether there is only one target scheduling unit for theto-be-adjusted node;

when there is only one target scheduling unit for the to-be-adjustednode, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing the carrying bandwidth of thetarget node(s) in the target scheduling unit by a correspondingto-be-adjusted bandwidth;

when there are two or more target scheduling units of the to-be-adjustednode, calculating a first ratio of total available bandwidth amounts ofall target scheduling units;

calculating an increase amount for each of the target scheduling unitsbased on the calculated first ratio and the to-be-adjusted bandwidthamount of the to-be-adjusted node; and

increasing a total carrying bandwidth amount of a target node(s) in eachof the target scheduling units by an increase amount corresponding tothis target scheduling unit, and decreasing a carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit.

In an implementation, the step of increasing a total carrying bandwidthamount of a target node(s) in each of the target scheduling units by anincrease amount corresponding to this target scheduling unit, anddecreasing a carrying bandwidth of the to-be-adjusted node in the targetscheduling unit by the increase amount corresponding to this targetscheduling unit comprises:

determining whether only one target node is included in the targetscheduling unit;

when only one target node is included in the target scheduling unit,increasing the total carrying bandwidth amount of the target node in thetarget scheduling unit by the increase amount corresponding to thistarget scheduling unit and decreasing the carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit;

when two or more target nodes are included in the target schedulingunit, calculating a second ratio of available bandwidths of the targetnodes in the target scheduling unit;

calculating an adjustment value for each target node in the targetscheduling unit based on the calculated second ratio and the calculatedincrease amount for the target scheduling unit; and

increasing the carrying bandwidth of each target node in the targetscheduling unit by a to-be-adjusted bandwidth amount corresponding tothis target node and decreasing the carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to the target scheduling unit.

In an implementation, the step of decreasing a total carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjusted nodecomprises:

selecting a reference scheduling unit for the to-be-adjusted node fromthe scheduling units including the to-be-adjusted node by a greedyalgorithm, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node and increasing a total carrying bandwidthamount of the reference scheduling unit for the to-be-adjusted node bythe to-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.

In an implementation, the step of decreasing a total carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjusted nodecomprises:

selecting one unselected target scheduling unit from all targetscheduling units of the to-be-adjusted node as a second scheduling unit;

determining whether a total available bandwidth amount of a targetnode(s) in the second scheduling unit is greater than a remainingto-be-adjusted bandwidth amount of the to-be-adjusted node, wherein theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node isa difference between the to-be-adjusted bandwidth amount of theto-be-adjusted node and an adjusted bandwidth amount of theto-be-adjusted node;

when the total available bandwidth amount of the target node(s) in thesecond scheduling unit is greater than the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node, determining whether theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node isgreater than a carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit;

when the remaining to-be-adjusted bandwidth amount of the to-be-adjustednode is less than or equal to the carrying bandwidth of theto-be-adjusted node in the second scheduling unit, increasing the totalcarrying bandwidth amount of the target node(s) in the second schedulingunit by the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node and decreasing the carrying bandwidth of theto-be-adjusted node in the second scheduling unit by the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node;

when the remaining to-be-adjusted bandwidth amount of the to-be-adjustednode is greater than the carrying bandwidth of the to-be-adjusted nodein the second scheduling unit, increasing the total carrying bandwidthamount of the target node(s) in the second scheduling unit by a targetvalue and decreasing the carrying bandwidth of the to-be-adjusted nodein the second scheduling unit by the target value; and returning toperform the step of selecting one unselected target scheduling unit fromall target scheduling units of the to-be-adjusted node as a secondscheduling unit, until the remaining to-be-adjusted bandwidth amount ofthe to-be-adjusted node is zero, wherein the target value is determinedbased on the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, and is less than or equal to the carrying bandwidth ofthe to-be-adjusted node in the second scheduling unit; and

when the total available bandwidth amount of the target node(s) in thesecond scheduling unit is less than or equal to the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node, increasingthe total carrying bandwidth amount of the target node(s) in the secondscheduling unit by the total available bandwidth amount of the targetnode(s) in the second scheduling unit and decreasing the carryingbandwidth of the to-be-adjusted node in the second scheduling unit bythe total available bandwidth amount of the target node(s) in the secondscheduling unit; and returning to perform the step of selecting oneunselected target scheduling unit from all target scheduling units ofthe to-be-adjusted node as a second scheduling unit, until the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is zero.

In an implementation, the step of selecting one unselected targetscheduling unit from all target scheduling units of the to-be-adjustednode as a second scheduling unit comprises:

selecting one target scheduling unit that is not currently selected andis at a foremost position in the target scheduling units ordered in apreset manner, as the second scheduling unit, wherein the preset mannerindicates ordering the scheduling units in a descending order based onthe total available bandwidth amounts of the target nodes and the usedbandwidths of the to-be-adjusted node in the target scheduling units.

In an implementation, when the overload bandwidth of the overload nodeis greater than a total reference available bandwidth amount of theoverload node, the method further comprises:

determining whether the overload bandwidth of the overload node iswithin a preset tolerance interval for the overload node, wherein thetolerance interval is determined by a preset second bandwidth thresholdcorresponding to the overload node and the preset first bandwidththreshold corresponding to the overload node;

when the overload bandwidth of the overload node is not within thepreset tolerance interval for the overload node, determining whether atarget bandwidth of the overload node is greater than the totalavailable bandwidth amount of the target node(s) for the overload node,wherein the target bandwidth of the overload node is a differencebetween the total used bandwidth amount of the overload node and thepreset second bandwidth threshold corresponding to the overload node;and

when the target bandwidth of the overload node is greater than the totalavailable bandwidth amount of the target node(s) for the overload node,decreasing the total carrying bandwidth amount of the target node(s) forthe overload node in a third scheduling unit(s) by the target bandwidth,increasing a total carrying bandwidth amount of a reference node(s) inthe third scheduling unit(s) by the target bandwidth, decreasing thetotal carrying bandwidth amount of the overload node in the targetscheduling unit for the overload node by the target bandwidth, andincreasing the total carrying bandwidth amount of the target node(s) forthe overload node in the target scheduling unit by the target bandwidth,wherein the third scheduling unit(s) is a scheduling unit(s) thatincludes the target node(s) for the overload node, except for the targetscheduling units including the overload node; the reference node(s) is anode(s) other than the target node(s) for the overload node and theoverload node in the third scheduling unit(s).

For clarity, a method for bandwidth adjustment provided in theembodiment of the present application is described below with referenceto FIGS. 1-7. For detailed description of the steps of the method forbandwidth adjustment provided in the foregoing embodiments of thepresent application, reference can be made to the description ofcorresponding steps in the embodiments corresponding to FIG. 1-7. Amethod for bandwidth adjustment provided in the embodiments of thepresent application is described below with reference to FIGS. 1-7.

FIG. 1 is a first flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S101: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

The node mentioned herein may be a CDN (Content Delivery Network) node.The total used bandwidth amount of a node is the sum of the usedbandwidths of the node in all scheduling units including the node. Thepreset first bandwidth thresholds corresponding to different nodes maybe the same or different. The preset first bandwidth thresholdcorresponding to a node may be calculated based on a carrying bandwidthof the node and a preset first used bandwidth ratio threshold of thenode. For example, the carrying bandwidth of Node 1 is 10 G, and thefirst used bandwidth ratio threshold of Node 1 is 80%, then the presetfirst bandwidth threshold corresponding to Node 1 is 8 G. If the totalused bandwidth amount of Node 1 is 9 G, then Node 1 is an overload node.If the total used bandwidth amount of Node 1 is 7 G, then Node 1 is notoverloaded. The preset first bandwidth threshold corresponding to thenode may also be a preset fixed value.

In the embodiment of the present application, a total used bandwidthamount of each node and a preset first bandwidth threshold correspondingto each node may be obtained first, and then it is determined whethereach node is overloaded by comparing the total used bandwidth amount ofthe node with the preset first bandwidth threshold corresponding to thenode. Specifically, if the total used bandwidth amount of a node isgreater than the preset first bandwidth threshold corresponding to thenode, the node is determined as an overload node. The preset firstbandwidth threshold corresponding to each node may be stored in advance,or may be obtained in other ways. Of course, the overload nodes may alsobe obtained directly from other servers. For example, the overload nodesthat may be obtained from other servers are Node 1, Node 2, Node 3, andso on.

In the embodiment of the present application, data such as the totalused bandwidth amount of a node, the total available bandwidth amount ofa node, and the total carrying bandwidth amount of a node can beobtained in the following ways.

Data refresh is initiated at a preset interval to obtain the data.Specifically, the data may be obtained from Central Control, Zabbix, andInfluxDB. The data obtained from Central Control, Zabbix, and InfluxDBis predetermined. For example, Zabbix stores the total used bandwidthamount of a node, and thus the total used bandwidth amount of the nodemay be obtained in advance from Zabbix. Zabbix is an enterprise-levelopen source solution that provides distributed system monitoring andnetwork monitoring functions based on the WEB (World Wide Web)interface. InfluxDB is an open source time series, event, and indexdistributed database. In the process of data acquisition, it is possibleto determine whether data acquisition is abnormal. If the dataacquisition is abnormal, it indicates that to-be-acquired data has notbeen acquired. At this time, it is possible to continue acquiring thedata. If the data acquisition fails again, then it is determined whetherthe to-be-acquired data is strong associated data, that is, it isdetermined whether the fact that the to-be-acquired data is not acquiredwill cause a subsequent bandwidth adjustment to be unachievable. If thefact that the to-be-acquired data is not acquired will cause thesubsequent bandwidth adjustment to be unachievable, a warning messagemay be sent to the staff to troubleshoot timely. In addition, if dataacquired by a terminal this time is not strong associated data, the dataacquisition is continued. After there is no abnormality in the processof acquiring data, or after the data is acquired through retrying, theavailability and accuracy of the acquired data is verified. Theavailability of the data may be verified according to the relationshipbetween the data. The accuracy of the data may be verified based onempirical values. After verifying the availability and accuracy of thedata, the verified data is stored in Rsdis and RDS (Relational DatabaseService). Redis is an open source, in-memory data structure server,which may be used as a database, a cache, and a message queue agent. Inthe process of bandwidth adjustment, data may be obtained from Rsdis orRDS.

S102: for each overload node, determining whether an overload bandwidthof the overload node is greater than a total current available bandwidthamount of all target nodes for the overload node, wherein the overloadbandwidth of the overload node is a difference between the total usedbandwidth amount of the overload node and the preset first bandwidththreshold corresponding to the overload node; the target nodes for theoverload node are nodes whose total used bandwidth amount are less thanthe preset first bandwidth threshold corresponding to the nodes in allscheduling units including the overload node; if the overload bandwidthof the overload node is less than or equal to the total currentavailable bandwidth amount of all target nodes for the overload node,performing step S103; if the overload bandwidth of the overload node isgreater than the total current available bandwidth amount of all targetnodes for the overload node, ending the process.

If it is determined that the overload bandwidth of the overload node isgreater than the total current available bandwidth amount of all targetnodes for the overload node, it is indicated that all target nodes forthe overload node cannot currently carry the overload bandwidth of theoverload node, and thus the carrying bandwidth of the overload node maynot be adjusted at this time. Thus, the total carrying bandwidth amountof the overload node is no longer adjusted. If it is determined that theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, it is indicated that all target nodes for the overloadnode can currently carry the overload bandwidth of the overload node,and thus the carrying bandwidth of the overload node may be adjusted.

The overload bandwidth of the overload node may be understood as aportion of the total used bandwidth amount of the node exceeding thepreset first bandwidth threshold corresponding to the node, that is, adifference between the total used bandwidth amount of the overload nodeand the preset first bandwidth threshold corresponding to the overloadnode. For example, if the total used bandwidth amount of Node 2 is 12 G,and the preset first bandwidth threshold corresponding to Node 2 is 10G, the overload bandwidth of Node 2 is 2 G.

A scheduling unit is determined by a domain name and a link. A domainname is the name of a computer or group of computers on Internetcomposed of a series of characters separated by “dot”. The purpose of adomain name is to facilitate the remembering and communication of theaddress of a group of servers. One link of one domain name is called onescheduling unit. For example, Nodes 1, 2, and 3 are nodes in BeijingMobile Link, and all provide service for Beijing area with a domain nameof Mobile. Nodes 1, 2, and 3 may be considered as one scheduling unit.Since one scheduling unit is determined by one domain name and one link,one scheduling unit may include one or more nodes. Different schedulingunits may include a same node, but nodes included in the differentscheduling units are not exactly the same.

The target node(s) for one overload node is a node(s) whose total usedbandwidth amount is less than the preset first bandwidth thresholdcorresponding to the node(s) in all the scheduling units including theoverload node. It can be understood that in nodes including in all thescheduling units including the overload node, a node(s) without overloadis the target node(s) for the overload node. For example, the overloadnode is Node 1, and the scheduling unit in which Node 1 is located isScheduling Unit A. The scheduling unit includes Node 1, Node 2, Node 3,and Node 4. Node 2 is also an overload node. Thus, the target nodes forNode 1 are Node 3 and Node 4. The scheduling units in which the overloadnode 2 is located are Scheduling Unit A and Scheduling Unit B.Scheduling Unit B includes Node 2, Node 3, and Node 5. The target nodesfor Node 2 are Node 3, Node 4, and Node 6.

It should be noted that if the overload node is located only in onescheduling unit and there is only one node in the scheduling unit, thenthere is no target node for the overload node. If nodes included in allthe scheduling units including the overload node are overload nodes,then there is no target node for the overload node. If there is notarget node for an overload node, it is indicated that the carryingbandwidth of the overload node cannot be adjusted, and the subsequentsteps are not performed.

The available bandwidth of the target node(s) may decrease with theadjustment of the carrying bandwidth of the overload node correspondingto the target node(s). The total available bandwidth amount of thetarget node(s) for one overload node will vary with the adjustment ofthe carrying bandwidth of the overload node in the scheduling unit wherethe target node(s) is located.

S103: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

When the overload bandwidth of one overload node is less than or equalto the total current available bandwidth amount of all target nodes forthe overload node, it is indicated that all target nodes for theoverload node can carry the overload bandwidth of the overload node.

In the embodiment of the present application, when the carryingbandwidth of the overload node is greater than or equal to the overloadbandwidth of the overload node, the overload bandwidth of the overloadnode may be determined as the to-be-adjusted bandwidth amount of theoverload node. In case the carrying bandwidth of the overload node isless than or equal to the total current available bandwidth amount ofall target nodes for the overload node, a value is selected from a rangeof zero to the carrying bandwidth of the overload node as theto-be-adjusted bandwidth of the overload node. In case the carryingbandwidth of the overload node is greater than the total currentavailable bandwidth amount of all target nodes for the overload node, avalue is selected from a range of zero to the total current availablebandwidth amount of all target nodes for the overload node as theto-be-adjusted bandwidth of the overload node. When the carryingbandwidth of the overload node is less than the overload bandwidth ofthe overload node, the carrying bandwidth of the overload node may bedetermined as the to-be-adjusted bandwidth amount of the overload node.Alternatively, a value may be selected from a range of zero to thecarrying bandwidth of the overload node as the to-be-adjusted bandwidthof the overload node. For example, the overload node is Node 1, thecarrying bandwidth of Node 1 is 10 G, the overload bandwidth of Node 1is 1 G, and the total current available bandwidth amount of all targetnodes for Node 1 is 5 G. Thus, the overload bandwidth of Node 1 may bedetermined as the to-be-adjusted bandwidth amount of Node 1; or a valuemay be selected from a range of 0-5 G as the to-be-adjusted bandwidthamount of Node 1.

S104: for each to-be-adjusted node, decreasing a total carryingbandwidth amount of the to-be-adjusted node by a to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node, andincreasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, wherein the to-be-adjusted node is anoverload node whose overload bandwidth is less than or equal to thetotal available bandwidth amount of all target nodes for the overloadnode; the total target carrying bandwidth amount of the to-be-adjustednode is a sum of current carrying bandwidths of all target nodes for theto-be-adjusted node; an increase carrying bandwidth amount of one targetnode in one scheduling unit is less than or equal to an availablebandwidth of the target node in the scheduling unit, and the increasecarrying bandwidth amount of one target node in one scheduling unit isless than or equal to the to-be-adjusted bandwidth amount of theto-be-adjusted node.

If the overload bandwidth of one overload node is less than or equal tothe total current available bandwidth amount of all target nodes for theoverload node, the overload node may be called a to-be-adjusted node.The sum of current carrying bandwidths of all target nodes for oneto-be-adjusted node is taken as the total target carrying bandwidthamount of the to-be-adjusted node. For example, the to-be-adjusted nodeis Node 2, and the target nodes for Node 2 are Node 3, Node 4, and Node6. The current carrying bandwidth of Node 3 is 10 G, the currentcarrying bandwidth of Node 4 is 15 G, and the current carrying bandwidthof Node 6 is 12 G. Thus, the total target carrying bandwidth amount ofNode 2 is 37 G. If the to-be-adjusted bandwidth of Node 2 is 2 G and thecarrying bandwidth of Node 2 is 10 G, then the adjusted carryingbandwidth of Node 2 is 8 G, and the adjusted total target carryingbandwidth amount of Node 2 is 39 G.

One target node is allocated with a carrying bandwidth in eachscheduling unit, and the available bandwidth of the target node in onescheduling unit is a difference between the carrying bandwidth allocatedto the target node in the scheduling unit and the used bandwidth of thetarget node in the scheduling unit. For example, if the carryingbandwidth allocated to Node 3 in Scheduling Unit A is 5 G, and the usedbandwidth of Node 3 in Scheduling Unit A is 4 G, the available bandwidthof Node 3 in Scheduling Unit A is 1 G. In order to avoid overload of thetarget node caused by the adjustment of the to-be-adjusted bandwidth,the increase carrying bandwidth amount of one target node in onescheduling unit is less than or equal to the available bandwidth of thetarget node in the scheduling unit. In this example, the increasecarrying bandwidth amount of Node 3 in Scheduling Unit A is at most 1 G.

The principle of allocating requests based on the carrying bandwidth isthat the larger the carrying bandwidth is, the more the allocatedrequests are. Decreasing the carrying bandwidth of an overload node candecrease subsequent requests allocated to the overload node and decreasethe bandwidth used in processing these requests. Therefore, the load ofthe overload node in subsequent work can be decreased and thepossibility of subsequent overloading of the overload node can bedecreased.

If the overload bandwidth of one to-be-adjusted node is too large, afailure may occur and the user's request cannot be responded. Therefore,it is possible to adjust the carrying bandwidth of the to-be-adjustednode to avoid the failure due to too large overload bandwidth of theto-be-adjusted node. When there is more than one to-be-adjusted node,the carrying bandwidths of the to-be-adjusted nodes may be adjustedsequentially in order of overload bandwidths from big to small. Thereason of the adjustment in order of overload bandwidths from big tosmall is that if the to-be-adjusted node with a smaller overloadbandwidth is adjusted first, the carrying bandwidth of theto-be-adjusted node with a larger overload bandwidth may not be adjustedsince the total available bandwidth amount of the target node(s) is lessthan the overload bandwidth, which results in failure of the overloadnode due to heavy load.

It should be noted that the bandwidth scheduling method provided in theembodiment of the present application may be set in IP (InternetProtocol) scheduling. IP scheduling is also called 302 scheduling, whichis a traffic scheduling method in CDN. Compared to DNS (Domain NameSystem) scheduling, the 302 scheduling service in the IP schedulingperforms 302 redirection on a client's request and forwards the client'srequest to a redirected node for processing.

The IP scheduling can obtain the client's IP address. The more refinedscheduling can be performed based on the client's IP address. DNSscheduling is to perform scheduling based on local DNS addresses(providing caching and recursive service), which has a coarserscheduling granularity. Compared with IP scheduling, DNS scheduling alsohas the following disadvantages:

1. The client may set a wrong LocalDNS, which may cause a largerdistance between a determined server processing a client's request andthe client.

2. The operator's LocalDNS recurs according to the standard DNSprotocol. However, because there are multiple exits on the network and atarget route NAT (Network Address Translation) is configured, an IPaddress of an exit may not be an IP address of this network when theLocalDNS finally performs recursive parsing.

3. The operator's LocalDNS may perform parsing forwarding. The parsingforwarding refers to that the operator does not perform recursive domainname parsing, but forwards a domain name parsing request to recursiveDNSs of other operators.

Bandwidth adjustment based on DNS scheduling is not precise enough,because of, on one hand, flow leads caused by regional specializationstrategies of ISP (Internet Service Provider) and the specialization ofDNS, and on the other hand, the limitation of the number of virtual IPaddresses of each node of the DNS and the limitation of the number ofvirtual IP addresses for each scheduling unit. The above two factorsresult in that the bandwidth is only adjusted proportionally, whichleads to a coarse adjustment granularity. With the method for bandwidthadjustment provided in the embodiment of the present application, thecarrying bandwidths of the overload node and the target node(s) may notbe adjusted proportionally. Specifically, the total carrying bandwidthamount of the overload node is decreased, and the total carryingbandwidth amount of the target node(s) is increased, which can make thebandwidth adjustment more accurate and more real-time.

The completion of bandwidth adjustment for all nodes may be understoodas the generation of a traffic scheduling policy. The traffic schedulingpolicy may be used by the IP scheduling service. The IP schedulingservice obtains personalized requirements of clients. The personalizedrequirements of clients may be the requirements for the response time ofthe request, the requirements for the response results, or the like.Then, specialized configurations are made based on the personalizedrequirements of clients. An optimal node is selected by the trafficscheduling strategy to provide service for the clients. In this way, therequirements of the clients can be met, better services are provided forusers, and a greater flexibility than DNS scheduling services can beprovided.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In case the overloadbandwidth of the overload node is less than or equal to the totalavailable bandwidth amount of the target nodes for the overload node,the total carrying bandwidth amount of the overload node is decreased,and the sum of the carrying bandwidths of all target nodes is increased.Compared with the case where the carrying bandwidths of the overloadnode and the target nodes need to be adjusted proportionally in theexisting technologies, in the embodiments of the present application,the carrying bandwidths of the overload node and the target nodes maynot be adjusted proportionally. Instead, the total carrying bandwidthamount of the overload node is decreased by a correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target node is increased by the corresponding to-be-adjustedbandwidth amount. Therefore, bandwidth adjustment is more accuratecompared with the existing technologies.

FIG. 2 is a second flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S201: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S202: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node are nodes whose total used bandwidth amount areless than the preset first bandwidth threshold in all scheduling unitsincluding the overload node; if the overload bandwidth of the overloadnode is less than or equal to the total current available bandwidthamount of all target nodes for the overload node, performing step S203;if the overload bandwidth of the overload node is greater than the totalcurrent available bandwidth amount of all target nodes for the overloadnode, ending the process.

S203: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

It should be noted that S201-S203 are the same as S101-S103 in the aboveembodiment, and will not be repeated here.

S204: for each to-be-adjusted node, determining whether theto-be-adjusted node meets a target condition, wherein the targetcondition is that the overload bandwidth of the to-be-adjusted node isless than a corresponding first preset threshold, and the totalavailable bandwidth amount of all target nodes for the to-be-adjustednode is greater than a corresponding second preset threshold, whereinthe second preset threshold is greater than the first preset threshold;if the to-be-adjusted node meets the target condition, performing stepS205, and if the to-be-adjusted node does not meet the target condition,ending the process.

The first preset threshold mentioned herein may be determined in advancebased on experience, and the second preset threshold may also bedetermined in advance based on experience. The second preset thresholdis greater than the first preset threshold. The value of the firstpreset threshold and the value of the second preset threshold are notspecifically limited in the embodiment of the present application.

The determining of whether one to-be-adjusted node meets the targetcondition includes first determining whether the overload bandwidth ofthe to-be-adjusted node is less than the first preset threshold; if theoverload bandwidth of the to-be-adjusted node is greater than the firstpreset threshold, then determining whether the total available bandwidthamount of all target nodes for the to-be-adjusted node is greater thanthe second preset threshold; and if the total available bandwidth amountof all target nodes for the to-be-adjusted node is greater than thesecond preset threshold, determining that the to-be-adjusted node meetsthe target condition. The first preset thresholds corresponding todifferent nodes may be the same or different. In the case where a samenode is overloaded again, in determining whether the to-be-adjusted nodemeets the target condition again, the first preset threshold used may beor may not be the same as the first preset threshold previously used.The second preset thresholds corresponding to different nodes may be thesame or different. In the case where a same node is overloaded again, indetermining whether the to-be-adjusted node meets the target conditionsagain, the second preset threshold used may be or may not be the same asthe second preset threshold previously used. These are determinedaccording to actual situations. If one to-be-adjusted node does not meetthe target condition, it is indicated that S205 cannot be performed onthe to-be-adjusted node. At this time, the total carrying bandwidthamount of the to-be-adjusted node may not be adjusted, that is, theadjustment of the total carrying bandwidth amount of the adjusted nodeis ended.

S205: selecting, from all target scheduling units, one target schedulingunit whose total available bandwidth amount is greater than theto-be-adjusted bandwidth amount of the to-be-adjusted node as a firstscheduling unit, wherein the target scheduling units are schedulingunits including the to-be-adjusted node and other nodes than theto-be-adjusted node.

The case that one to-be-adjusted node meets the target condition may beunderstood that the overload bandwidth of the to-be-adjusted node isrelatively small and the total available bandwidth amount of all targetnodes for the to-be-adjusted node is relatively large. At this time, thecarrying bandwidth of the to-be-adjusted node may be decreased and thetotal target carrying bandwidth amount of the to-be-adjusted node may beincreased, which has little effect on the total used bandwidth amount ofall target nodes for the to-be-adjusted node. Therefore, one targetscheduling unit whose total available bandwidth amount is greater thanthe to-be-adjusted bandwidth amount of the to-be-adjusted node may beselected from all target scheduling units as a first scheduling unit. Inthis way, a to-be-adjusted unit in which the to-be-adjusted node isadjustable may be determined conveniently and quickly, and the targetscheduling unit may not be selected again, improving the efficiency ofbandwidth adjustment.

If a scheduling unit includes only the to-be-adjusted node, then thecarrying bandwidth of the to-be-adjusted node in the scheduling unitcannot be adjusted, and therefore, the scheduling unit cannot be used asa target scheduling unit. The target scheduling unit should be ascheduling unit that includes the to-be-adjusted node and other nodesthan the to-be-adjusted node. For example, Scheduling Units A, B, and Call include Node 1, and Scheduling units A, B, and C include other nodesthan Node 1. Therefore, Scheduling Units A, B, and C may be used as thetarget scheduling unit.

S206: decreasing the carrying bandwidth of the to-be-adjusted node inthe first scheduling unit by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node.

In the embodiment of the present application, the total availablebandwidth amount corresponding to the selected first scheduling unit isgreater than the overload bandwidth of the to-be-adjusted node, whichindicates that the total available bandwidth amount of the targetnode(s) in the first scheduling unit can support the to-be-adjustedbandwidth amount of the to-be-adjusted node. Therefore, the carryingbandwidth of the to-be-adjusted unit in the first scheduling unit may bedirectly decreased by the corresponding to-be-adjusted bandwidth amount.It should be noted that the carrying bandwidth of the to-be-adjustednode in the first scheduling unit is greater than or equal to theto-be-adjusted bandwidth amount of the to-be-adjusted node. For example,the to-be-adjusted node is Node 2, and the scheduling units includingNode 2 are Scheduling Units B, C, and D. The total available bandwidthamount of Scheduling Unit B is 10 G, the total available bandwidthamount of Scheduling Unit C is 8 G, the total available bandwidth amountof Scheduling Unit D is 6 G, and the to-be-adjusted bandwidth amount ofNode 2 is 1 G. Scheduling Unit B is selected as the first schedulingunit for Node 2. The carrying bandwidth allocated to Node 2 inScheduling Unit B is 5 G. Then the carrying bandwidth of Node 2 inScheduling Unit B is decreased by 1 G, and the adjusted carryingbandwidth of Node 2 in Scheduling Unit B is 4 G.

S207: increasing the total carrying bandwidth amount of the targetnode(s) in the first scheduling unit by the corresponding to-be-adjustedbandwidth amount.

The total carrying bandwidth amount of the target node(s) in the firstscheduling unit is increased by the corresponding to-be-adjustedbandwidth amount. In the case where there is only one target node in thefirst scheduling unit, the carrying bandwidth of the target node may beincreased by the corresponding to-be-adjusted bandwidth amount. Theto-be-adjusted bandwidth amount is the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node. In the case where there aretwo or more target nodes in the first scheduling unit, one target nodewhose available bandwidth in the first scheduling unit is greater thanthe to-be-adjusted bandwidth amount of the to-be-adjusted node may beselected, and then the carrying bandwidth of the selected target node isincreased by the corresponding to-be-adjusted bandwidth. Alternatively,two or more target nodes in the first scheduling unit may be selected,and the increase amount corresponding to each target node may bedetermined. The sum of the increase amounts of the selected target nodesis the to-be-adjusted bandwidth amount. The carrying bandwidth of eachselected target node is increased by the increase amount correspondingto this selected target node.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target nodes for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnodes may not be adjusted proportionally, but the total carryingbandwidth amount of the overload node is decreased by the correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target nodes is increased by the corresponding to-be-adjustedbandwidth amount. When the overload node meets the target condition, onescheduling unit is directly selected, the carrying bandwidth of theoverload node is decreased by the corresponding to-be-adjusted bandwidthamount, and the total carrying bandwidth amount of the target node(s)for the selected scheduling unit is increased by the correspondingto-be-adjusted bandwidth amount. In this way, not only can the bandwidthadjustment be made more precise, but also the to-be-adjusted unit inwhich the to-be-adjusted node is adjustable can be determined moreconveniently and quickly, which can improve the efficiency of bandwidthadjustment.

FIG. 3 is a third flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S301: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S302: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node are nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node; if theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, performing step S303; if the overload bandwidth of theoverload node is greater than the total current available bandwidthamount of all target nodes for the overload node, ending the process.

S303: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

S304: for each to-be-adjusted node, determining whether theto-be-adjusted node meets a target condition; if the to-be-adjusted nodemeets the target condition, performing step S305, and if theto-be-adjusted node does not meet the target condition, performing stepS308; wherein the target condition is that the overload bandwidth of theto-be-adjusted node is less than a corresponding first preset threshold,and the total available bandwidth amount of all target nodes for theto-be-adjusted node is greater than a corresponding second presetthreshold, wherein the second preset threshold is greater than the firstpreset threshold.

S305: selecting, from all target scheduling units, one target schedulingunit whose total available bandwidth amount is greater than theto-be-adjusted bandwidth amount of the to-be-adjusted node as a firstscheduling unit, wherein the target scheduling units are a schedulingunits including the to-be-adjusted node.

S306: decreasing the carrying bandwidth of the to-be-adjusted node inthe first scheduling unit by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node.

S307: increasing the total carrying bandwidth amount of the targetnode(s) in the first scheduling unit by the to-be-adjusted bandwidthamount corresponding to the to-be-adjusted node.

It should be noted that S301-S303 are the same as S101-S103 in the aboveembodiment, respectively, and S304-S307 are the same as S204-S207 in theabove embodiment, respectively. Thus, they will not be repeated here.

S308: determining whether there is only one target scheduling unit forthe to-be-adjusted node; if there is only one target scheduling unit forthe to-be-adjusted node, performing step S309; if there is more than onetarget scheduling unit for the to-be-adjusted node, performing stepS310.

S309: decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing the carrying bandwidth of thetarget node(s) in the target scheduling unit by the to-be-adjustedbandwidth corresponding to the to-be-adjusted node.

Once the target scheduling unit(s) of the to-be-adjusted node isdetermined, the number of target scheduling units of the to-be-adjustednode is determined. If there is only one target scheduling unit, thecarrying bandwidth of the to-be-adjusted node in the target schedulingunit may be decreased by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and the carrying bandwidth ofthe target node(s) in the target scheduling unit is increased by theto-be-adjusted bandwidth corresponding to the to-be-adjusted node.

S310: calculating a first ratio of total available bandwidth amounts ofall target scheduling units.

When there is more than one target scheduling unit for theto-be-adjusted node, a first ratio of the total available amounts of thetarget scheduling units may be calculated. For example, Scheduling UnitsA, B, and C are the target scheduling units of Node 1. The totalavailable bandwidth amount of Scheduling Unit A is 4 G, the totalavailable bandwidth amount of Scheduling Unit B is 4 G, and the totalavailable bandwidth amount of Scheduling Unit C is 2 G. Then the firstratio of the total available bandwidth amounts of the determined targetscheduling units is 2:2:1.

S311: calculating an increase amount of each target scheduling unitbased on the calculated first ratio and the to-be-adjusted bandwidthamount of the to-be-adjusted node.

Continuing the example given in S310, if the to-be-adjusted bandwidthamount of Node 1 is 1G (here, 1 G=1000M is taken as an example fordescription), then the increase amount of Scheduling Unit A is 400M, andthe increase amount of Scheduling Unit B is 400M, the increase amount ofScheduling Unit C is 200M.

S312: for each target scheduling unit, increasing the total carryingbandwidth amount of the target node(s) in the target scheduling unit bythe increase amount corresponding to the target scheduling unit, anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thetarget scheduling unit.

Continuing the example given in S310, the total carrying bandwidthamount of the target node(s) in Scheduling Unit A is increased by 400M,and the carrying bandwidth of Node 1 in Scheduling Unit A is decreasedby 400M. The total carrying bandwidth amount of the target node(s) inScheduling Unit B is increased by 400M, and the carrying bandwidth ofNode 1 in Scheduling Unit B is decreased by 400M. The total carryingbandwidth amount of the target node(s) in Scheduling Unit C is increasedby 200M, and the carrying bandwidth of Node 1 in Scheduling Unit C isdecreased by 200M.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target nodes for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the ratio of the total available bandwidth amounts of thetarget nodes can reflect proportional relationship between the targetnodes more accurately. Through the ratio of the total availablebandwidth amounts of the target nodes, the increase amount of the targetnodes in the target scheduling units can be determined, which candecrease the error of bandwidth adjustment and realize more finebandwidth adjustment.

FIG. 4 is a fourth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S401: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S402: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node are nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node; if theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, performing step S403; if the overload bandwidth of theoverload node is greater than the total current available bandwidthamount of all target nodes for the overload node, ending the process.

S403: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

S404: for each to-be-adjusted node, determining whether theto-be-adjusted node meets a target condition; if the to-be-adjusted nodemeets the target condition, performing step S405, and if theto-be-adjusted node does not meet the target condition, performing stepS408; wherein the target condition is that the overload bandwidth of theto-be-adjusted node is less than a corresponding first preset threshold,and the total available bandwidth amount of all target nodes for theto-be-adjusted node is greater than a corresponding second presetthreshold, wherein the second preset threshold is greater than the firstpreset threshold.

S405: selecting, from all target scheduling units, one target schedulingunit whose total available bandwidth amount is greater than theto-be-adjusted bandwidth amount of the to-be-adjusted node as a firstscheduling unit, wherein the target scheduling units are schedulingunits including the to-be-adjusted node.

S406: decreasing the carrying bandwidth of the to-be-adjusted node inthe first scheduling unit by the to-be-adjusted bandwidth amountcorresponding to the first scheduling unit.

S407: increasing the total carrying bandwidth amount of the targetnode(s) in the first scheduling unit by the to-be-adjusted bandwidthamount corresponding to the first scheduling unit.

S408: determining whether there is only one target scheduling unit forthe to-be-adjusted node; if there is only one target scheduling unit forthe to-be-adjusted node, performing step S409; if there is more than onetarget scheduling unit for the to-be-adjusted node, performing stepS410.

S409: decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing the carrying bandwidth of thetarget node(s) in the target scheduling unit by the to-be-adjustedbandwidth corresponding to the to-be-adjusted node;

S410: calculating a first ratio of total available bandwidth amounts ofall target scheduling units.

S411: calculating an increase amount of each target scheduling unitbased on the calculated first ratio and the to-be-adjusted bandwidthamount of the to-be-adjusted node.

It should be noted that S401-S403 are the same as S101-S103 in the aboveembodiment, respectively, and S404-S407 are the same as S204-S207 in theabove embodiment, respectively, and S405-S411 are the same as S305-S311in the above embodiment, respectively. Thus, they will not be repeatedhere.

S412: for each target scheduling unit, determining whether only onetarget node is included in the target scheduling unit; if only onetarget node is included in the target scheduling unit, performing stepS413, if more than one target node is included in the target schedulingunit, performing step S414.

S413: increasing the total carrying bandwidth amount of the target nodein the target scheduling unit by the increase amount corresponding tothe target scheduling unit, and decreasing the carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to the target scheduling unit.

When one target scheduling unit includes one target node, the calculatedincrease amount of the target scheduling unit cannot be allocated todifferent target nodes, and therefore only the carrying bandwidth of thetarget node can be increased by the increase amount.

S414: calculating a second ratio of available bandwidths of the targetnodes in the target scheduling unit.

In the case where there are two or more target nodes in one targetscheduling unit, the increase amount corresponding to the targetscheduling unit is allocated to these target nodes, so that thebandwidth adjustment is more balanced, thus decreasing the possibilityof overloading the target node due to unbalanced adjustment of thecarrying bandwidth.

The second ratio is a ratio of the carrying bandwidths of the targetnodes. For example, Scheduling Unit A is a target scheduling unit, andthe target nodes included in Scheduling Unit A are Node 3 and Node 4.The available bandwidth of Node 3 is 1G, and the available bandwidth ofNode 4 is 3G. Thus, the second ratio is 1:3.

S415: calculating an adjustment value of each target node in the targetscheduling unit based on the calculated second ratio and the calculatedincrease amount of the target scheduling unit.

Continuing the example in S414, if the increase amount of SchedulingUnit A is 400M, the calculated adjustment value of Node 3 is 100M, andthe adjustment value of Node 4 is 300M.

S416: increasing the carrying bandwidth of each target node in thetarget scheduling unit by a to-be-adjusted bandwidth amountcorresponding to the target node, and decreasing the carrying bandwidthof the to-be-adjusted node in the target scheduling unit by the increaseamount corresponding to the target scheduling unit.

Continuing the example in S414, the carrying bandwidth of Node 3 inScheduling Unit A is increased by 100M, the carrying bandwidth of Node 4in Scheduling Unit A is increased by 300M, and the carrying bandwidth ofNode 1 in Scheduling Unit A is decreased by 400M.

In the embodiment of the present application, in the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target nodes for the overloadnode, if the number of target scheduling units is different, the methodfor adjusting the bandwidth of the to-be-adjusted node is different; andif the number of target nodes is different, the method for adjusting thebandwidth of the to-be-adjusted node is also different. Compared withthe case where the carrying bandwidths of the overload node and thetarget node(s) need to be adjusted proportionally in the existingtechnologies, in the embodiments of the present application, theadjustment method of the to-be-adjusted node and the increase value ofthe carrying bandwidth of the target node are determined flexiblyaccording to actual situations. Therefore, compared to the existingtechnologies, the bandwidth can be adjusted more finely by the presentapplication.

FIG. 5 is a fifth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S501: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S502: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node is nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node; if theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, performing step S503; if the overload bandwidth of theoverload node is greater than the total current available bandwidthamount of all target nodes for the overload node, ending the process.

S503: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

S504: for each to-be-adjusted node, selecting a reference schedulingunit for the to-be-adjusted node from a scheduling unit(s) including theto-be-adjusted node by using a greedy algorithm, and decreasing thetotal carrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, and increasing a total carrying bandwidth amount of the referencescheduling unit for the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node.

The greedy algorithm refers to making a locally optimal choice at eachstage in problem-solving. In other words, it provides a locally optimalsolution to some extent without providing a global optimum. In theembodiment of the present application, the greedy algorithm is mainlyconfigured to select a reference scheduling unit for the to-be-adjustednode after obtaining information such as the to-be-adjusted bandwidth ofthe to-be-adjusted node, the used bandwidth of the target node(s) in thescheduling unit, the available bandwidth of the target node(s) in thetarget scheduling unit, the carrying bandwidth of the target node(s) inthe scheduling unit and the carrying bandwidth of the to-be-adjustednode in the scheduling unit, or the like. The reference scheduling unitselected by the greedy algorithm is a local optimal solution, ratherthan an overall optimal solution of selecting a reference schedulingunit. This can quickly determine the reference scheduling unitcorresponding to the to-be-adjusted node, improving the efficiency ofbandwidth adjustment.

For one to-be-adjusted node, if there is only one reference schedulingunit, the carrying bandwidth of the to-be-adjusted node in the referencescheduling unit is decreased by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and the total carryingbandwidth amount of the target node(s) in the reference scheduling unitis increased by the to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node. Specifically, in the case where there is only onetarget node in the reference scheduling unit, the carrying bandwidth ofthe target node in the reference scheduling unit is increased by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode. In the case where there are two or more target nodes in thereference scheduling unit, a bandwidth adjustment amount of each targetnode is determined, and a carrying bandwidth of each target node in thereference scheduling unit is adjusted by the bandwidth adjustment amountcorresponding to the target node. The bandwidth adjustment amount ofeach target node may be determined by the greedy algorithm in selectinga reference bandwidth by the greedy algorithm. It may also be determinedin other ways.

For one to-be-adjusted node, in the case where there is more than onereference scheduling unit, a bandwidth adjustment amount of eachreference scheduling unit is determined; the carrying bandwidth of theto-be-adjusted node in each reference scheduling unit is adjusted by thebandwidth adjustment amount corresponding to the reference schedulingunit; and the total carrying bandwidth amount of the target node(s) ineach reference scheduling unit is increased by the bandwidth adjustmentamount corresponding to the reference scheduling unit. Specifically, forthe adjustment of the carrying bandwidth of the target node(s) in thereference scheduling unit, a reference may be made to the foregoingmethod for adjusting the carrying bandwidth of the target node(s) in thecase where there is only one reference scheduling unit, which is notdescribed herein again.

In the embodiment of the present application, in the case where theoverload bandwidth of the overload node is greater than the totalavailable bandwidth amount of the target nodes for the overload node, areference scheduling unit for the to-be-adjusted node is determined by agreedy algorithm; the carrying bandwidth of the to-be-adjusted node inthe reference scheduling is decreased, and the total carrying bandwidthamount of the target node(s) in the reference scheduling unit isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target node(s) need to be adjusted proportionallyin the existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnode(s) may not be adjusted proportionally. Instead, the carryingbandwidth of the to-be-adjusted node in the reference scheduling unit isdecreased, and the total carrying bandwidth amount of the target node(s)in the reference scheduling unit is increased. In this way, thebandwidth adjustment is finer. In addition, by selecting a referencescheduling unit with a greedy algorithm, a scheduling unit that is to beadjusted can be quickly determined, thereby improving the efficiency ofbandwidth adjustment.

FIG. 6 is a sixth flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S601: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S602: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node is nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node; if theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, performing step S603; if the overload bandwidth of theoverload node is greater than the total current available bandwidthamount of all target nodes for the overload node, ending the process.

S603: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

It should be noted that S601-S603 are the same as S101-S103 in the aboveembodiment, and will not be repeated here.

S604: for each to-be-adjusted node, selecting one unselected targetscheduling unit from all target scheduling units of the to-be-adjustednode as a second scheduling unit.

The target scheduling unit for one to-be-adjusted node refers to ascheduling unit including the to-be-adjusted node. One unselected targetscheduling unit may be randomly selected from all the target schedulingunits of the to-be-adjusted node as the second scheduling unit.Alternatively, one target scheduling unit with the largest totalavailable bandwidth amount may be selected from an unselected targetscheduling unit(s) of the to-be-adjusted node as the second schedulingunit. Of course, the second scheduling unit may also be selected in thefollowing manner:

for each to-be-adjusted node, selecting one target scheduling unit thatis currently not selected and is at the foremost position in the targetscheduling units ordered in a preset manner, as the second schedulingunit, wherein the preset manner may refer to ordering the targetscheduling units in a descending order according to the total availablebandwidth amounts of the target node(s) and the used bandwidths of theto-be-adjusted node in the target scheduling units.

In the embodiment of the present application, the target schedulingunits are ordered in advance. Specifically, all the scheduling units areordered in a descending order according to the total available bandwidthamounts of the target node(s) in the scheduling units and the usedbandwidths of the to-be-adjusted node in the scheduling units. This cancomprehensively consider the actual situation of the target node(s) andthe to-be-adjusted node, so that the selection of the second schedulingunit is more reasonable, and the adjustment of the bandwidth can be morereasonable.

S605: determining whether a total available bandwidth amount of thetarget node(s) in the second scheduling unit is greater than a remainingto-be-adjusted bandwidth amount of the to-be-adjusted node; if the totalavailable bandwidth amount of the target node(s) in the secondscheduling unit is greater than the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node, performing step S606; if the totalavailable bandwidth amount of the target node(s) in the secondscheduling unit is less than or equal to the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node, performing step S609,wherein the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is a difference between the to-be-adjusted bandwidthamount of the to-be-adjusted node and an adjusted bandwidth amount ofthe to-be-adjusted node.

The remaining to-be-adjusted bandwidth amount of the to-be-adjusted nodeis the difference between the to-be-adjusted bandwidth amount of theto-be-adjusted node and the adjusted bandwidth amount. The adjustedbandwidth refers to a total carrying bandwidth amount that has beenadjusted by a certain scheduling unit using the method for bandwidthadjustment provided in the embodiment of the present application. Forexample, the to-be-adjusted node is Node 1, the to-be-adjusted bandwidthamount of Node 1 is 1 G, and the adjusted bandwidth amount of Node 1 is600M. This means that the total carrying bandwidth amount of Node 1 isdecreased by 600M after the bandwidth adjustment, and the remainingto-be-adjusted bandwidth amount of Node 1 is 400M.

S606: determining whether the remaining to-be-adjusted bandwidth amountof the to-be-adjusted node is greater than the carrying bandwidth of theto-be-adjusted node in the second scheduling unit; if the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is less thanor equal to the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit, performing step S607; if the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is greaterthan the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, performing step S608.

S607: increasing the total carrying bandwidth amount of the targetnode(s) in the second scheduling unit by the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node, and decreasing the carryingbandwidth of the to-be-adjusted node in the second scheduling unit bythe remaining to-be-adjusted bandwidth amount of the to-be-adjustednode.

For the manner of increasing the total carrying bandwidth amount of thetarget node(s) in the second scheduling unit by the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node, a referencemay be made to the foregoing manner of increasing the total carryingbandwidth amount of the target node(s) in the target scheduling unit bythe corresponding increase amount. Alternatively, it is also possible torandomly determine an increase carrying bandwidth amount of the targetnodes in the second scheduling unit, and increase the carrying bandwidthof each target node in the second scheduling unit by the increasecarrying bandwidth amount corresponding to this target node. Of course,there are other adjustment manners, which will not be listed one by onehere.

S608: increasing the total carrying bandwidth amount of the targetnode(s) in the second scheduling unit by a target value, and decreasingthe carrying bandwidth of the to-be-adjusted node in the secondscheduling unit by the target value; returning to perform step S604until the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is zero, wherein the target value is determinedbased on the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, and the target value is less than or equal to thecarrying bandwidth of the to-be-adjusted node in the second schedulingunit.

In the embodiment of the present application, the target value isgreater than zero, which may be the carrying bandwidth of theto-be-adjusted node in the second scheduling unit, and may be less thanthe carrying bandwidth of the to-be-adjusted node in the secondscheduling node. In other words, the target value may be a valueselected randomly or by a preset algorithm within a range of zero to thecarrying bandwidth of the to-be-adjusted node in the second schedulingunit.

For the manner of increasing the total carrying bandwidth amount of thetarget node(s) in the second scheduling unit by the target value, areference may be made to the manner of increasing the total carryingbandwidth amount of the target node(s) in the second scheduling unit bythe remaining to-be-adjusted bandwidth amount of the to-be-adjustednode.

S609: increasing the total carrying bandwidth amount of the targetnode(s) in the second scheduling unit by the total available bandwidthamount of the target node(s) in the second scheduling unit, anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the total available bandwidth amount of thetarget node(s) in the second scheduling unit; returning to perform stepS604 until the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is zero.

In the embodiment of the present application, in the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target node for the overloadnode, according to the relationship among the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node, the carrying bandwidth ofthe to-be-adjusted node in the selected scheduling unit and the totalcarrying bandwidth amount of the target node(s) in the selectedscheduling unit, different increased values of the total carryingbandwidth amount of the target node(s) in the determined scheduling unitcan cause the bandwidth to be flexibly adjusted, thereby achieving afiner bandwidth adjustment.

FIG. 7 is a seventh flowchart of a method for bandwidth adjustmentaccording to an embodiment of the present application. The methodincludes the following steps.

S701: obtaining one or more overload nodes, wherein each of the overloadnodes is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the node.

S702: for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node is nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node; if theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node, performing step S703; if the overload bandwidth of theoverload node is greater than the total current available bandwidthamount of all target nodes for the overload node, performing step S705.

S703: determining a to-be-adjusted bandwidth amount of the overload nodebased on the overload bandwidth of the overload node.

S704: for each to-be-adjusted node, decreasing the total carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node, andincreasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, wherein the to-be-adjusted node is anoverload node whose overload bandwidth is less than or equal to a totalavailable bandwidth amount of all target nodes for the to-be-adjustednode; the total target carrying bandwidth amount of the to-be-adjustednode is the sum of current carrying bandwidths of all target nodes forthe to-be-adjusted node; an increase carrying bandwidth amount of onetarget node in one scheduling unit is less than or equal to theavailable bandwidth of the target node in the scheduling unit, and theincrease carrying bandwidth amount of the target node in the schedulingunit is less than or equal to the to-be-adjusted bandwidth amount of theto-be-adjusted node.

S705: determining whether the overload bandwidth of the overload node iswithin a preset tolerance interval for the overload node; if theoverload bandwidth of the overload node is not within the presettolerance interval for the overload node, performing step S706; if theoverload bandwidth of the overload node is within the preset toleranceinterval for the overload node, ending the process, wherein thetolerance interval is determined according to a preset second bandwidththreshold corresponding to the overload node and the preset firstbandwidth threshold corresponding to the overload node.

In the embodiment of the present application, the tolerance interval maybe an interval determined by the difference between the preset secondbandwidth threshold corresponding to the overload node and the presetfirst bandwidth threshold corresponding to the overload node. Forexample, if the preset first bandwidth threshold corresponding to Node 1is 10 G and the preset second bandwidth threshold corresponding to Node1 is 12 G, the tolerance interval is [0, 2 G]. If the overload bandwidthof Node 1 is 1 G, the process ends. This means that the overloadbandwidth of Node 1 is currently within the tolerance interval, thus thecarrying bandwidth of Node 1 may not be adjusted. If the overloadbandwidth of Node 1 is 2.1 G, S706 is performed.

S706: determining whether a target bandwidth of the overload node isgreater than the total available bandwidth amount of all target nodesfor the overload node; if the target bandwidth of the overload node isgreater than the total available bandwidth amount of all target nodesfor the overload node, performing step S707; otherwise, ending theprocess; wherein the target bandwidth of the overload node is adifference between the total used bandwidth amount of the overload nodeand the preset second bandwidth threshold corresponding to the overloadnode.

For example, if the total used bandwidth amount of Node 1 is 14 G andthe preset second bandwidth threshold corresponding to Node 1 is 12 G,the target bandwidth of Node 1 is 2 G. If the total available bandwidthamount of all target nodes for Node 1 is 1 G, then step S707 isperformed.

S707: decreasing a total carrying bandwidth amount of a target node(s)for the overload node in a third scheduling unit(s) by the targetbandwidth, increasing a total carrying bandwidth amount of a referencenode(s) in the third scheduling unit by the target bandwidth, decreasingthe total carrying bandwidth amount of the overload node in the targetscheduling unit for the overload node by the target bandwidth, andincreasing the total carrying bandwidth amount of the target node(s) forthe overload node in the target scheduling unit by the target bandwidth,wherein the third scheduling unit(s) is a scheduling unit(s) thatincludes the target node(s) for the overload node and does not includethe overload node; the reference node(s) is a node(s) other than thetarget node(s) for the overload node and the overload node in the thirdscheduling unit.

The third scheduling unit(s) is a scheduling unit(s) including thetarget node(s) for the overload node, except for the target schedulingunit(s) including the overload node. For example, the overload node isNode A. The target nodes for Node A are B, C. Scheduling Unit 1 includesNodes A, B, and C. Scheduling Unit 2 includes Nodes B, C, and D.Scheduling Unit 3 includes Nodes C, E and H. Thus, the third schedulingunits are Scheduling Unit 2 and Scheduling Unit 3, and the referencenodes are Nodes D, E, and H.

For the manner of increasing the total carrying bandwidth amount of thereference node(s) in the third scheduling unit(s) by the targetbandwidth, a reference may be made to the manner of increasing the totalcarrying bandwidth amount of the target node(s) in the first schedulingunit by the corresponding to-be-adjusted bandwidth amount, or to themanner of increasing the total carrying bandwidth amount of the targetnode(s) in the target scheduling unit by the corresponding increaseamount.

Continuing the example in S706, the target bandwidth is 1 G, andScheduling Unit 1 is the target scheduling unit. During specificadjustment, the total carrying bandwidth amount of Nodes D, E, and H inScheduling Unit 2 and Scheduling Unit 3 is increased by 1 G, and thenthe total carrying bandwidth amount of Nodes B and C in Scheduling Unit2 and Scheduling Unit 3 is decreased by 1 G; the carrying bandwidth ofNode A in Scheduling Unit 1 is decreased by 1 G, and the total carryingbandwidth amount of Nodes B and C in Scheduling Unit 1 is increased by 1G.

In the embodiment of the present application, when the overloadbandwidth of the overload node is less than or equal to the totalavailable bandwidth amount of the target node(s) for the overload node,the bandwidth is adjusted jointly by decreasing the total carryingbandwidth amount of the target node(s) in the third scheduling unit(s),increasing the total carrying bandwidth amount of the reference node(s)in the third scheduling unit(s), increasing the total carrying bandwidthamount of the target node(s) in the target scheduling unit anddecreasing the total carrying bandwidth amount of the overload node inthe target scheduling unit, thereby achieving distributed bandwidthbalance, balancing the traffic of related nodes in real time, andobtaining more flexible adjustment method and more accurate bandwidthadjustment.

In a second aspect, an embodiment of the present application provides anapparatus for bandwidth adjustment. The apparatus comprises:

an obtaining module, configured for obtaining an overload node, whereinthe overload node is a node whose total used bandwidth amount is greaterthan a preset first bandwidth threshold corresponding to the overloadnode;

a first judging module, configured for determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of a target node(s) for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the targetnode(s) for the overload node is a node(s) whose total used bandwidthamount is less than the preset first bandwidth threshold correspondingto the overload node in all scheduling units including the overloadnode;

a determining module, configured for when the overload bandwidth of theoverload node is less than or equal to the total current availablebandwidth amount of the target node(s) for the overload node,determining the overload node as a to-be-adjusted node and determining ato-be-adjusted bandwidth amount of the to-be-adjusted node;

a first adjusting module, configured for decreasing a total carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node, andincreasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, wherein the total target carrying bandwidthamount of the to-be-adjusted node is a sum of current carryingbandwidth(s) of the target node(s) for the to-be-adjusted node; anincrease carrying bandwidth amount of the target node(s) in a schedulingunit is less than or equal to an available bandwidth of the targetnode(s) in the scheduling unit, and the increase carrying bandwidthamount of the target node(s) in the scheduling unit is less than orequal to the to-be-adjusted bandwidth amount of the to-be-adjusted node.

In an implementation, the first adjusting module comprises:

a first judging sub-module, configured for determining whether theto-be-adjusted node meets a target condition, wherein the targetcondition is that the overload bandwidth of the to-be-adjusted node isless than a first preset threshold corresponding to the to-be-adjustednode, and the total available bandwidth amount of the target node(s) forthe to-be-adjusted node is greater than a second preset thresholdcorresponding to the to-be-adjusted node, wherein the second presetthreshold is greater than the first preset threshold;

a first selecting sub-module, configured for when the to-be-adjustednode meets the target condition, selecting one target scheduling unitwhose total available bandwidth amount is greater than theto-be-adjusted bandwidth amount of the to-be-adjusted node from alltarget scheduling units as a first scheduling unit, wherein the targetscheduling units are scheduling units including the to-be-adjusted node;

a first adjusting sub-module, configured for decreasing a carryingbandwidth of the to-be-adjusted node in the first scheduling unit by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode; and

a second adjusting sub-module, configured for increasing a totalcarrying bandwidth amount of the target node(s) in the first schedulingunit by the to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node.

In an implementation, the first adjusting module further comprises:

a second judging sub-module, configured for, when the to-be-adjustednode does not meet the target condition, determining whether there isonly one target scheduling unit for the to-be-adjusted node;

a third adjusting sub-module, configured for when there is only onetarget scheduling unit for the to-be-adjusted node, decreasing the totalcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, and increasing the carrying bandwidth of the target node(s) in thetarget scheduling unit by the to-be-adjusted bandwidth corresponding tothe to-be-adjusted node;

a first calculating sub-module, configured for when there are two ormore target scheduling units of the to-be-adjusted node, calculating afirst ratio of total available bandwidth amounts of all targetscheduling units;

a second calculating sub-module, configured for calculating an increaseamount for each of the target scheduling units based on the calculatedfirst ratio and the to-be-adjusted bandwidth amount of theto-be-adjusted node; and

a fourth adjusting sub-module, configured for increasing a totalcarrying bandwidth amount of a target node(s) in each of the targetscheduling units by an increase amount corresponding to this targetscheduling unit, and decreasing a carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit.

In an implementation, the fourth adjusting sub-module comprises:

a first judging unit, configured for determining whether only one targetnode is included in the target scheduling unit;

a first adjusting unit, configured for increasing the total carryingbandwidth amount of the target node in the target scheduling unit by theincrease amount corresponding to this target scheduling unit anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thistarget scheduling unit;

a first calculating unit, configured for when two or more target nodesare included in the target scheduling unit, calculating a second ratioof the available bandwidths of the target nodes in the target schedulingunit;

a second calculating unit, configured for calculating an adjustmentvalue for each target node in the target scheduling unit based on thecalculated second ratio and the calculated increase amount for thetarget scheduling unit; and

a second adjusting unit, configured for increasing the carryingbandwidth of each target node in the target scheduling unit by ato-be-adjusted bandwidth amount corresponding to this target node anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thetarget scheduling unit.

In an implementation, the first adjusting module is configured forselecting a reference scheduling unit for the to-be-adjusted node fromthe scheduling units including the to-be-adjusted node by a greedyalgorithm, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node and increasing a total carrying bandwidthamount of the reference scheduling unit for the to-be-adjusted node bythe to-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.

In an implementation, the first adjusting module comprises:

a second selecting sub-module, configured for selecting one unselectedtarget scheduling unit from all target scheduling units of theto-be-adjusted node as a second scheduling unit;

a third judging sub-module, configured for determining whether a totalavailable bandwidth amount of a target node(s) in the second schedulingunit is greater than a remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, wherein the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node is a difference between theto-be-adjusted bandwidth amount of the to-be-adjusted node and anadjusted bandwidth amount of the to-be-adjusted node;

a fourth judging sub-module, configured for when the total availablebandwidth amount of the target node(s) in the second scheduling unit isgreater than the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, determining whether the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node is greater than a carryingbandwidth of the to-be-adjusted node in the second scheduling unit;

a fifth adjusting sub-module, configured for when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is less thanor equal to the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit, increasing the total carrying bandwidth amountof the target node(s) in the second scheduling unit by the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the remaining to-be-adjusted bandwidth amountof the to-be-adjusted node;

a sixth adjusting sub-module, configured for when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is greaterthan the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, increasing the total carrying bandwidth amount of thetarget node(s) in the second scheduling unit by a target value anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the target value; and returning to perform thesecond selecting sub-module, until the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node is zero, wherein the targetvalue is determined based on the carrying bandwidth of theto-be-adjusted node in the second scheduling unit, and is less than orequal to the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit; and

a seventh adjusting sub-module, configured for when the total availablebandwidth amount of the target node(s) in the second scheduling unit isless than or equal to the remaining to-be-adjusted bandwidth amount ofthe to-be-adjusted node, increasing the total carrying bandwidth amountof the target node(s) in the second scheduling unit by the totalavailable bandwidth amount of the target node(s) in the secondscheduling unit and decreasing the carrying bandwidth of theto-be-adjusted node in the second scheduling unit by the total availablebandwidth amount of the target node(s) in the second scheduling unit;and returning to perform the second selecting sub-module, until theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node iszero.

In an implementation, the second selecting sub-module is configured forselecting one target scheduling unit that is not currently selected andis at a foremost position in the target scheduling units ordered in apreset manner, as the second scheduling unit, wherein the preset mannerindicates ordering the scheduling units in a descending order based ontotal available bandwidth amounts of the target node(s) and usedbandwidths of the to-be-adjusted node in the target scheduling units.

In an implementation, the apparatus further comprises:

a second judging module, configured for, when the overload bandwidth ofthe overload node is greater than the total current available bandwidthamount of the target node(s) for the overload node and when the overloadbandwidth of the overload node is greater than a total referenceavailable bandwidth amount of the overload node, determining whether theoverload bandwidth of the overload node is within a preset toleranceinterval for the overload node, wherein the tolerance interval isdetermined by a preset second bandwidth threshold corresponding to theoverload node and the preset first bandwidth threshold corresponding tothe overload node;

a third judging module, configured for when the overload bandwidth ofthe overload node is not within the preset tolerance interval for theoverload node, determining whether a target bandwidth of the overloadnode is greater than the total available bandwidth amount of the targetnode(s) for the overload node, wherein the target bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset second bandwidth thresholdcorresponding to the overload node; and

a second adjusting module, configured for when the target bandwidth ofthe overload node is greater than the total available bandwidth amountof the target node(s) for the overload node, decreasing a total carryingbandwidth amount of the target node(s) for the overload node in a thirdscheduling unit(s) by the target bandwidth, increasing a total carryingbandwidth amount of a reference node(s) in the third scheduling unit(s)by the target bandwidth, decreasing the total carrying bandwidth amountof the overload node in the target scheduling unit for the overload nodeby the target bandwidth, and increasing the total carrying bandwidthamount of the target node(s) for the overload node in the targetscheduling unit by the target bandwidth, wherein the third schedulingunit(s) is a scheduling unit(s) that includes the target node(s) for theoverload node, except for the target scheduling units including theoverload node; the reference node(s) is a node(s) other than the targetnode(s) for the overload node and the overload node in the thirdscheduling unit(s).

For clarity of the solution, an apparatus for bandwidth adjustmentprovided by an embodiment of the present application is described belowwith reference to FIG. 8.

FIG. 8 is a structural diagram of an apparatus for bandwidth adjustmentaccording to an embodiment of the present application. The apparatuscomprises:

an obtaining module 801, configured for obtaining one or more overloadnodes, wherein each of the overload nodes is a node whose total usedbandwidth amount is greater than a preset first bandwidth thresholdcorresponding to the node.

a first judging module 802, configured for determining, for eachoverload node, whether an overload bandwidth of the overload node isgreater than a total current available bandwidth amount of all targetnodes for the overload node, wherein the overload bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset first bandwidth threshold correspondingto the overload node; the target nodes for the overload node are nodeswhose total used bandwidth amount are less than the preset firstbandwidth threshold corresponding to the nodes in all scheduling unitsincluding the overload node;

a determining module 803, configured for determining a to-be-adjustedbandwidth amount of the overload node based on the overload bandwidth ofthe overload node when the first judging module 802 determines that theoverload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all target nodes for theoverload node;

a first adjusting module 804, configured for, for each to-be-adjustednode, decreasing a total carrying bandwidth amount of the to-be-adjustednode by a to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node, and increasing a total target carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, wherein the to-be-adjustednode is an overload node whose overload bandwidth is less than or equalto the total available bandwidth amount of all target nodes for theoverload node; the total target carrying bandwidth amount of theto-be-adjusted node is a sum of current carrying bandwidths of alltarget nodes for the to-be-adjusted node; an increase carrying bandwidthamount of one target node in one scheduling unit is less than or equalto an available bandwidth of the target node in the scheduling unit, andthe increase carrying bandwidth amount of one target node in onescheduling unit is less than or equal to the to-be-adjusted bandwidthamount of the to-be-adjusted node.

The to-be-adjusted bandwidth amount of the overload node may bedetermined according to the overload bandwidth amount of the overloadnode. In the case where the overload bandwidth of the overload node isless than or equal to the total available bandwidth amount of the targetnode(s) for the overload node, the total carrying bandwidth amount ofthe overload node is decreased, and the sum of the carrying bandwidthsof all target nodes is increased. Compared with the case where thecarrying bandwidths of the overload node and the target nodes need to beadjusted proportionally in the existing technologies, in the embodimentsof the present application, the carrying bandwidths of the overload nodeand the target nodes may not be adjusted proportionally. Instead, thetotal carrying bandwidth amount of the overload node is decreased by thecorresponding to-be-adjusted bandwidth amount, and the total carryingbandwidth amount of the target nodes is increased by the correspondingto-be-adjusted bandwidth amount. Therefore, bandwidth adjustment of thepresent application is more accurate compared with the existingtechnologies.

In an implementation of the present application, the first adjustingmodule 804 may comprise:

a first judging sub-module, configured for determining, eachto-be-adjusted node, whether the to-be-adjusted node meets a targetcondition, wherein the target condition is that the overload bandwidthof the to-be-adjusted node is less than a first preset thresholdcorresponding to the to-be-adjusted node, and the total availablebandwidth amount of all target nodes for the to-be-adjusted node isgreater than a second preset threshold corresponding to theto-be-adjusted node, wherein the second preset threshold is greater thanthe first preset threshold;

a first selecting sub-module, configured for, when the to-be-adjustednode meets the target condition, selecting, from all target schedulingunits, one target scheduling unit whose total available bandwidth amountis greater than the to-be-adjusted bandwidth amount of theto-be-adjusted node as a first scheduling unit, wherein the targetscheduling units are scheduling units including the to-be-adjusted nodeand other nodes than the to-be-adjusted node;

a first adjusting sub-module, configured for decreasing a carryingbandwidth of the to-be-adjusted node in the first scheduling unit by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode;

a second adjusting sub-module, configured for increasing the totalcarrying bandwidth amount of the target node(s) in the first schedulingunit by the to-be-adjusted bandwidth amount corresponding to theto-be-adjusted node.

In an implementation of the present application, the first adjustingmodule 804 may further comprise:

a second judging sub-module, configured for when the to-be-adjusted nodedoes not meet the target condition, determining whether there is onlyone target scheduling unit for the to-be-adjusted node;

a third adjusting sub-module, configured for when there is only onetarget scheduling unit for the to-be-adjusted node, decreasing the totalcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, and increasing the carrying bandwidth of the target node(s) in thetarget scheduling unit by the to-be-adjusted bandwidth corresponding tothe to-be-adjusted node;

a first calculating sub-module, configured for when there are two ormore target scheduling units of the to-be-adjusted node, calculating afirst ratio of total available bandwidth amounts of all targetscheduling units;

a second calculating sub-module, configured for calculating an increaseamount of each target scheduling unit based on the calculated firstratio and the to-be-adjusted bandwidth amount of the to-be-adjustednode; and

a fourth adjusting sub-module, configured for, for each targetscheduling unit, increasing the total carrying bandwidth amount of thetarget node(s) in the target scheduling unit by the increase amountcorresponding to the target scheduling unit, and decreasing the carryingbandwidth of the to-be-adjusted node in the target scheduling unit bythe increase amount corresponding to the target scheduling unit.

In an implementation of the present application, the fourth adjustingsub-module may comprise:

a first judging unit, configured for, for each target scheduling unit,determining whether only one target node is included in the targetscheduling unit;

a first adjusting unit, configured for when only one target node isincluded in the target scheduling unit, increasing the total carryingbandwidth amount of the target node in the target scheduling unit by theincrease amount corresponding to the target scheduling unit, anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thetarget scheduling unit;

a first calculating unit, configured for when two or more target nodesare included in the target scheduling unit, calculating a second ratioof the available bandwidths of the target nodes in the target schedulingunit;

a second calculating unit, configured for calculating an adjustmentvalue for each target node in the target scheduling unit based on thecalculated second ratio and the calculated increase amount for thetarget scheduling unit;

a second adjusting unit, configured for increasing the carryingbandwidth of each target node in the target scheduling unit by ato-be-adjusted bandwidth amount corresponding to the target node, anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thetarget scheduling unit.

In an implementation of the present application, the first adjustingmodule 804 is specifically configured for selecting, for eachto-be-adjusted node, a reference scheduling unit for the to-be-adjustednode from the scheduling units including the to-be-adjusted node by agreedy algorithm, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node and increasing a total carrying bandwidthamount of the reference scheduling unit for the to-be-adjusted node bythe to-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.

In an implementation, the first adjusting module 804 may comprise:

a second selecting sub-module, configured for selecting, for eachto-be-adjusted node, selecting one unselected target scheduling unitfrom all target scheduling units of the to-be-adjusted node as a secondscheduling unit;

a third judging sub-module, configured for determining whether a totalavailable bandwidth amount of a target node(s) in the second schedulingunit is greater than a remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, wherein the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node is a difference between theto-be-adjusted bandwidth amount of the to-be-adjusted node and anadjusted bandwidth amount of the to-be-adjusted node;

a fourth judging sub-module, configured for when the total availablebandwidth amount of the target node(s) in the second scheduling unit isgreater than the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, determining whether the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node is greater than a carryingbandwidth of the to-be-adjusted node in the second scheduling unit;

a fifth adjusting sub-module, configured for when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is less thanor equal to the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit, increasing the total carrying bandwidth amountof the target node(s) in the second scheduling unit by the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the remaining to-be-adjusted bandwidth amountof the to-be-adjusted node;

a sixth adjusting sub-module, configured for, when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is greaterthan the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, increasing the total carrying bandwidth amount of thetarget node(s) in the second scheduling unit by a target value anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the target value; and returning to perform thesecond selecting sub-module, until the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node is zero, wherein the targetvalue is determined based on the carrying bandwidth of theto-be-adjusted node in the second scheduling unit, and is less than orequal to the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit;

a seventh adjusting sub-module, configured for when the total availablebandwidth amount of the target node(s) in the second scheduling unit isless than or equal to the remaining to-be-adjusted bandwidth amount ofthe to-be-adjusted node, increasing the total carrying bandwidth amountof the target node(s) in the second scheduling unit by the totalavailable bandwidth amount of the target node(s) in the secondscheduling unit and decreasing the carrying bandwidth of theto-be-adjusted node in the second scheduling unit by the total availablebandwidth amount of the target node(s) in the second scheduling unit;and returning to perform the second selecting sub-module, until theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node iszero.

In an implementation, the second selecting sub-module is configured forselecting, for each to-be-adjusted node, one target scheduling unit thatis not currently selected and is at a foremost position in the targetscheduling units ordered in a preset manner, as the second schedulingunit, wherein the preset manner indicates ordering the scheduling unitsin a descending order based on total available bandwidth amounts of thetarget node(s) and used bandwidths of the to-be-adjusted node in thetarget scheduling units.

In an implementation, the apparatus may further comprise:

a second judging module, configured for, when the overload bandwidth ofthe overload node is greater than the total current available bandwidthamount of all target nodes for the overload node and when the overloadbandwidth of the overload node is greater than a total referenceavailable bandwidth amount of the overload node, determining whether theoverload bandwidth of the overload node is within a preset toleranceinterval for the overload node, wherein the tolerance interval isdetermined by a preset second bandwidth threshold corresponding to theoverload node and the preset first bandwidth threshold corresponding tothe overload node;

a third judging module, configured for when the overload bandwidth ofthe overload node is not within the preset tolerance interval for theoverload node, determining whether a target bandwidth of the overloadnode is greater than the total available bandwidth amount of all targetnodes for the overload node, wherein the target bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset second bandwidth thresholdcorresponding to the overload node;

a second adjusting module, configured for when the target bandwidth ofthe overload node is greater than the total available bandwidth amountof all target nodes for the overload node, decreasing a total carryingbandwidth amount of the target node(s) for the overload node in a thirdscheduling unit(s) by the target bandwidth, increasing a total carryingbandwidth amount of a reference node(s) in the third scheduling unit(s)by the target bandwidth, decreasing the total carrying bandwidth amountof the overload node in the target scheduling unit for the overload nodeby the target bandwidth, and increasing the total carrying bandwidthamount of the target node(s) for the overload node in the targetscheduling unit by the target bandwidth, wherein the third schedulingunit(s) is a scheduling unit(s) that includes the target node(s) for theoverload node, except for the target scheduling units including theoverload node; the reference node(s) is a node(s) other than the targetnode(s) for the overload node and the overload node in the thirdscheduling unit(s).

An embodiment of the present application further provides an electronicdevice. As shown in FIG. 9, the electronic device comprises a processor901 and a memory 902.

The memory 902 is configured to store a computer program.

The processor 901 is configured to execute the program stored in thememory 902 to implement the following steps:

obtaining one or more overload nodes, wherein each of the overload nodesis a node whose total used bandwidth amount is greater than a presetfirst bandwidth threshold corresponding to the node;

for each of the overload nodes, determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node are nodes whose total used bandwidth amount areless than the preset first bandwidth threshold corresponding to thenodes in all scheduling units including the overload node;

when the overload bandwidth of the overload node is less than or equalto the total current available bandwidth amount of all the target nodesfor the overload node, determining a to-be-adjusted bandwidth amount ofthe overload node based on the overload bandwidth of the overload node;and

for each to-be-adjusted node, decreasing a total carrying bandwidthamount of the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, wherein the to-be-adjusted node is an overload node whose overloadbandwidth is less than or equal to the total available bandwidth amountof all target nodes for the overload node; the total target carryingbandwidth amount of the to-be-adjusted node is a sum of current carryingbandwidth(s) of all target nodes for the to-be-adjusted node; anincrease carrying bandwidth amount of one target node in one schedulingunit is less than or equal to an available bandwidth of the target nodein the scheduling unit, and the increase carrying bandwidth amount ofthe target node in the scheduling unit is less than or equal to theto-be-adjusted bandwidth amount of the to-be-adjusted node.

The memory may include Random Access Memory (RAM), and may also includeNon-Volatile Memory (NVM), such as at least one disk memory. Optionally,the memory may also be at least one storage device located away from theforegoing processor.

The above processor may be a general-purpose processor, including aCentral Processing Unit (CPU), a Network Processor (NP), or the like; itmay also be a Digital Signal Processor (DSP), an Application SpecificIntegrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) orother programmable logic devices, discrete gate or transistor logicdevices, discrete hardware components.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target node(s) for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnodes may not be adjusted proportionally. Instead, the total carryingbandwidth amount of the overload node is decreased by the correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target nodes is increased by the corresponding to-be-adjustedbandwidth amount. Therefore, bandwidth adjustment of the presentapplication is more accurate compared with the existing technologies.

In still another implementation of the present application, acomputer-readable storage medium is provided. The computer-readablestorage medium stores a computer program, which is executed by aprocessor, so as to cause the processor to perform the method forbandwidth adjustment according to any of the above embodiments.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target node(s) for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnodes may not be adjusted proportionally. Instead, the total carryingbandwidth amount of the overload node is decreased by the correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target nodes is increased by the corresponding to-be-adjustedbandwidth amount. Therefore, bandwidth adjustment of the presentapplication is more accurate compared with the existing technologies.

In yet still another implementation of the present application, acomputer program product is provided. The computer program product isexecuted by a computer, so as to cause the computer to perform themethod for bandwidth adjustment according to any of the aboveembodiments.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target node(s) for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnodes may not be adjusted proportionally. Instead, the total carryingbandwidth amount of the overload node is decreased by the correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target nodes is increased by the corresponding to-be-adjustedbandwidth amount. Therefore, bandwidth adjustment of the presentapplication is more accurate compared with the existing technologies.

In yet still another implementation of the present application, acomputer program is provided. The computer program is executed by acomputer, so as to cause the computer to perform the method forbandwidth adjustment according to any of the above embodiments.

In the embodiment of the present application, the to-be-adjustedbandwidth amount of the overload node may be determined according to theoverload bandwidth amount of the overload node. In the case where theoverload bandwidth of the overload node is less than or equal to thetotal available bandwidth amount of the target node(s) for the overloadnode, the total carrying bandwidth amount of the overload node isdecreased, and the sum of the carrying bandwidths of all target nodes isincreased. Compared with the case where the carrying bandwidths of theoverload node and the target nodes need to be adjusted proportionally inthe existing technologies, in the embodiments of the presentapplication, the carrying bandwidths of the overload node and the targetnodes may not be adjusted proportionally. Instead, the total carryingbandwidth amount of the overload node is decreased by the correspondingto-be-adjusted bandwidth amount, and the total carrying bandwidth amountof the target nodes is increased by the corresponding to-be-adjustedbandwidth amount. Therefore, bandwidth adjustment of the presentapplication is more accurate compared with the existing technologies.

INDUSTRIAL APPLICABILITY

A method and apparatus for bandwidth adjustment, an electronic deviceand a computer-readable storage medium provided in the embodiments ofthe present application can determine a to-be-adjusted bandwidth amountof an overload node according to an overload bandwidth amount of theoverload node; and when the overload bandwidth of the overload node isless than or equal to the total available bandwidth amount of the targetnode for the overload node, decrease the total carrying bandwidth amountof the overload node, and increase the sum of the carrying bandwidths ofall target nodes. Compared with the case where the carrying bandwidthsof the overload node and the target nodes need to be adjustedproportionally in the existing technologies, in the embodiments of thepresent application, the carrying bandwidths of the overload node andthe target nodes may not be adjusted proportionally. Instead, the totalcarrying bandwidth amount of the overload node is decreased by thecorresponding to-be-adjusted bandwidth amount, and the total carryingbandwidth amount of the target nodes is increased by the correspondingto-be-adjusted bandwidth amount. Therefore, bandwidth adjustment of thepresent application is more accurate compared with the existingtechnologies.

The embodiments described above are simply preferable embodiments of thepresent application, and are not intended to limit the scope ofprotection of the present application. Any modifications, alternatives,improvements, or the like within the spirit and principle of the presentapplication shall be included within the scope of protection of thepresent application.

The invention claimed is:
 1. A method for bandwidth adjustment,comprising: obtaining an overload node(s), wherein each of the overloadnode(s) is a node whose total used bandwidth amount is greater than apreset first bandwidth threshold corresponding to the overload node; foreach of the overload node(s), determining whether an overload bandwidthof the overload node is greater than a total current available bandwidthamount of all of target nodes for the overload node, wherein theoverload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node are nodes whose total used bandwidth amount isless than the preset first bandwidth threshold corresponding to theoverload node in all scheduling units including the overload node; whenthe overload bandwidth of the overload node is less than or equal to thetotal current available bandwidth amount of all of the target nodes forthe overload node, determining a to-be-adjusted bandwidth amount of theoverload node based on the overload bandwidth of the overload node; foreach to-be-adjusted node, decreasing a total carrying bandwidth amountof the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, wherein the to-be-adjusted node is an overload node whose overloadbandwidth is less than or equal to the total available bandwidth amountof all of target nodes for the to-be-adjusted node; the total targetcarrying bandwidth amount of the to-be-adjusted node is a sum of currentcarrying bandwidth(s) of all of the target nodes for the to-be-adjustednode; an increase carrying bandwidth amount of one target node in onescheduling unit is less than or equal to an available bandwidth of thetarget node in the scheduling unit, and is less than or equal to theto-be-adjusted bandwidth amount of the to-be-adjusted node.
 2. Themethod according to claim 1, wherein the step of, for eachto-be-adjusted node, decreasing a total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing a total target carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node comprises: foreach to-be-adjusted node, determining whether the to-be-adjusted nodemeets a target condition, wherein the target condition is that theoverload bandwidth of the to-be-adjusted node is less than a firstpreset threshold corresponding to the to-be-adjusted node, and the totalavailable bandwidth amount of all of the target nodes for theto-be-adjusted node is greater than a second preset thresholdcorresponding to the to-be-adjusted node, wherein the second presetthreshold is greater than the first preset threshold; when theto-be-adjusted node meets the target condition, selecting one targetscheduling unit whose total available bandwidth amount is greater thanthe to-be-adjusted bandwidth amount of the to-be-adjusted node from alltarget scheduling units as a first scheduling unit, wherein the targetscheduling units are scheduling units including the to-be-adjusted node;decreasing a carrying bandwidth of the to-be-adjusted node in the firstscheduling unit by the to-be-adjusted bandwidth amount corresponding tothe to-be-adjusted node; and increasing a total carrying bandwidthamount of the target nodes in the first scheduling unit by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.
 3. The method according to claim 2, wherein when theto-be-adjusted node does not meet the target condition, the step of, foreach to-be-adjusted node, decreasing a total carrying bandwidth amountof the to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node, and increasing a total targetcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjusted nodecomprises: determining whether there is only one target scheduling unitfor the to-be-adjusted node; when there is only one target schedulingunit for the to-be-adjusted node, decreasing the total carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node, andincreasing the carrying bandwidth of the target nodes in the targetscheduling unit by the to-be-adjusted bandwidth corresponding to theto-be-adjusted node; when there are two or more target scheduling unitsof the to-be-adjusted node, calculating a first ratio of total availablebandwidth amounts of all target scheduling units; calculating anincrease amount for each of the target scheduling units based on thecalculated first ratio and the to-be-adjusted bandwidth amount of theto-be-adjusted node; and for each of the target scheduling units,increasing a total carrying bandwidth amount of the target nodes in thetarget scheduling unit by an increase amount corresponding to thistarget scheduling unit, and decreasing a carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit.
 4. The method according toclaim 3, wherein the step of, for each of the target scheduling units,increasing a total carrying bandwidth amount of the target nodes in thetarget scheduling unit by an increase amount corresponding to thistarget scheduling unit, and decreasing a carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit comprises: for each of thetarget scheduling units, determining whether only one target node isincluded in the target scheduling unit; when only one target node isincluded in the target scheduling unit, increasing the total carryingbandwidth amount of the target node in the target scheduling unit by theincrease amount corresponding to this target scheduling unit anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thistarget scheduling unit; when two or more target nodes are included inthe target scheduling unit, calculating a second ratio of availablebandwidths of the target nodes in the target scheduling unit;calculating an adjustment value for each target node in the targetscheduling unit based on the calculated second ratio and the calculatedincrease amount for the target scheduling unit; and increasing thecarrying bandwidth of each target node in the target scheduling unit bya to-be-adjusted bandwidth amount corresponding to this target node anddecreasing the carrying bandwidth of the to-be-adjusted node in thetarget scheduling unit by the increase amount corresponding to thetarget scheduling unit.
 5. The method according to claim 1, wherein thestep of, for each to-be-adjusted node, decreasing a total carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node, andincreasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node comprises: for each to-be-adjusted node,selecting a reference scheduling unit for the to-be-adjusted node fromthe scheduling units including the to-be-adjusted node by a greedyalgorithm, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node and increasing a total carrying bandwidthamount of the reference scheduling unit for the to-be-adjusted node bythe to-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.
 6. The method according to claim 1, wherein the step of, for eachto-be-adjusted node, decreasing a total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing a total target carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node comprises: foreach to-be-adjusted node, selecting one unselected target schedulingunit from all target scheduling units of the to-be-adjusted node as asecond scheduling unit; determining whether a total available bandwidthamount of the target nodes in the second scheduling unit is greater thana remaining to-be-adjusted bandwidth amount of the to-be-adjusted node,wherein the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is a difference between the to-be-adjusted bandwidthamount of the to-be-adjusted node and an adjusted bandwidth amount ofthe to-be-adjusted node; when the total available bandwidth amount ofthe target nodes in the second scheduling unit is greater than theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node,determining whether the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is greater than a carrying bandwidth of theto-be-adjusted node in the second scheduling unit; when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is less thanor equal to the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit, increasing the total carrying bandwidth amountof the target nodes in the second scheduling unit by the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the remaining to-be-adjusted bandwidth amountof the to-be-adjusted node; when the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node is greater than the carrying bandwidthof the to-be-adjusted node in the second scheduling unit, increasing thetotal carrying bandwidth amount of the target nodes in the secondscheduling unit by a target value and decreasing the carrying bandwidthof the to-be-adjusted node in the second scheduling unit by the targetvalue; and returning to perform the step of selecting one unselectedtarget scheduling unit from all target scheduling units of theto-be-adjusted node as a second scheduling unit, until the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is zero,wherein the target value is determined based on the carrying bandwidthof the to-be-adjusted node in the second scheduling unit, and is lessthan or equal to the carrying bandwidth of the to-be-adjusted node inthe second scheduling unit; and when the total available bandwidthamount of the target nodes in the second scheduling unit is less than orequal to the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, increasing the total carrying bandwidth amount ofthe target nodes in the second scheduling unit by the total availablebandwidth amount of the target nodes in the second scheduling unit anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the total available bandwidth amount of thetarget nodes in the second scheduling unit; and returning to perform thestep of selecting one unselected target scheduling unit from all targetscheduling units of the to-be-adjusted node as a second scheduling unit,until the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is zero.
 7. The method according to claim 6, whereinthe step of, for each to-be-adjusted node, selecting one unselectedtarget scheduling unit from all target scheduling units of theto-be-adjusted node as a second scheduling unit comprises: for eachto-be-adjusted node, selecting one target scheduling unit that is notcurrently selected and is at a foremost position in the targetscheduling units ordered in a preset manner, as the second schedulingunit, wherein the preset manner indicates ordering the scheduling unitsin a descending order based on total available bandwidth amounts of thetarget nodes and used bandwidths of the to-be-adjusted node in thetarget scheduling units.
 8. The method according to claim 1, whereinwhen the overload bandwidth of the overload node is greater than a totalreference available bandwidth amount of the overload node, the methodfurther comprises: determining whether the overload bandwidth of theoverload node is within a preset tolerance interval for the overloadnode, wherein the tolerance interval is determined by a preset secondbandwidth threshold corresponding to the overload node and the presetfirst bandwidth threshold corresponding to the overload node; when theoverload bandwidth of the overload node is not within the presettolerance interval for the overload node, determining whether a targetbandwidth of the overload node is greater than the total availablebandwidth amount of all of the target nodes for the overload node,wherein the target bandwidth of the overload node is a differencebetween the total used bandwidth amount of the overload node and thepreset second bandwidth threshold corresponding to the overload node;when the target bandwidth of the overload node is greater than the totalavailable bandwidth amount of all of the target nodes for the overloadnode, decreasing a total carrying bandwidth amount of the target nodesfor the overload node in a third scheduling unit(s) by the targetbandwidth, increasing a total carrying bandwidth amount of a referencenode(s) in the third scheduling unit(s) by the target bandwidth,decreasing the total carrying bandwidth amount of the overload node inthe target scheduling unit for the overload node by the targetbandwidth, and increasing the total carrying bandwidth amount of thetarget nodes for the overload node in the target scheduling unit by thetarget bandwidth, wherein the third scheduling unit(s) is a schedulingunit(s) that includes the target nodes for the overload node, except forthe target scheduling units including the overload node; the referencenode(s) is a node(s) other than the target nodes for the overload nodeand the overload node in the third scheduling unit(s).
 9. An apparatusfor bandwidth adjustment, comprising: a memory that stores executablemodules; and a processor, coupled to the memory, that executes orfacilitates execution of the executable modules, the executable modulescomprising: an obtaining module, configured for obtaining an overloadnode(s), wherein each of the overload node(s) is a node whose total usedbandwidth amount is greater than a preset first bandwidth thresholdcorresponding to the overload node; a first judging module, configuredfor, for each of the overload node(s), determining whether an overloadbandwidth of the overload node is greater than a total current availablebandwidth amount of all of target nodes for the overload node, whereinthe overload bandwidth of the overload node is a difference between thetotal used bandwidth amount of the overload node and the preset firstbandwidth threshold corresponding to the overload node; the target nodesfor the overload node is a node(s) whose total used bandwidth amount isless than the preset first bandwidth threshold corresponding to theoverload node in all scheduling units including the overload node; adetermining module, configured for when the overload bandwidth of theoverload node is less than or equal to the total current availablebandwidth amount of all of the target nodes for the overload node,determining a to-be-adjusted bandwidth amount of the overload node basedon the overload bandwidth of the overload node; a first adjustingmodule, configured for, for each to-be-adjusted node, decreasing a totalcarrying bandwidth amount of the to-be-adjusted node by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode, and increasing a total target carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, wherein the to-be-adjusted node is anoverload node whose overload bandwidth is less than or equal to thetotal available bandwidth amount of all of target nodes for theto-be-adjusted node; the total target carrying bandwidth amount of theto-be-adjusted node is a sum of current carrying bandwidths of all ofthe target nodes for the to-be-adjusted node; an increase carryingbandwidth amount of one target node in one scheduling unit is less thanor equal to an available bandwidth of the target node in the schedulingunit, and is less than or equal to the to-be-adjusted bandwidth amountof the to-be-adjusted node.
 10. The apparatus according to claim 9, thefirst adjusting module comprises: a first judging sub-module, configuredfor, for each to-be-adjusted node, determining whether theto-be-adjusted node meets a target condition, wherein the targetcondition is that the overload bandwidth of the to-be-adjusted node isless than a first preset threshold corresponding to the to-be-adjustednode, and the total available bandwidth amount of all of the targetnodes for the to-be-adjusted node is greater than a second presetthreshold corresponding to the to-be-adjusted node, wherein the secondpreset threshold is greater than the first preset threshold; a firstselecting sub-module, configured for when the to-be-adjusted node meetsthe target condition, selecting one target scheduling unit whose totalavailable bandwidth amount is greater than the to-be-adjusted bandwidthamount of the to-be-adjusted node from all target scheduling units as afirst scheduling unit, wherein the target scheduling units arescheduling units including the to-be-adjusted node; a first adjustingsub-module, configured for decreasing a carrying bandwidth of theto-be-adjusted node in the first scheduling unit by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node; and a secondadjusting sub-module, configured for increasing a total carryingbandwidth amount of the target nodes in the first scheduling unit by theto-be-adjusted bandwidth amount corresponding to the to-be-adjustednode.
 11. The apparatus according to claim 10, wherein the firstadjusting module further comprises: a second judging sub-module,configured for, when the to-be-adjusted node does not meet the targetcondition, determining whether there is only one target scheduling unitfor the to-be-adjusted node; a third adjusting sub-module, configuredfor when there is only one target scheduling unit for the to-be-adjustednode, decreasing the total carrying bandwidth amount of theto-be-adjusted node by the to-be-adjusted bandwidth amount correspondingto the to-be-adjusted node, and increasing the carrying bandwidth of thetarget nodes in the target scheduling unit by the to-be-adjustedbandwidth corresponding to the to-be-adjusted node; a first calculatingsub-module, configured for when there are two or more target schedulingunits of the to-be-adjusted node, calculating a first ratio of totalavailable bandwidth amounts of all target scheduling units; a secondcalculating sub-module, configured for calculating an increase amountfor each of the target scheduling units based on the calculated firstratio and the to-be-adjusted bandwidth amount of the to-be-adjustednode; and a fourth adjusting sub-module, configured for, for each of thetarget scheduling units, increasing a total carrying bandwidth amount ofthe target nodes in the target scheduling unit by an increase amountcorresponding to this target scheduling unit, and decreasing a carryingbandwidth of the to-be-adjusted node in the target scheduling unit bythe increase amount corresponding to this target scheduling unit. 12.The apparatus according to claim 11, wherein the fourth adjustingsub-module comprises: a first judging unit, configured for, for each ofthe target scheduling units, determining whether only one target node isincluded in the target scheduling unit; a first adjusting unit,configured for, when only one target node is included in the targetscheduling unit, increasing the total carrying bandwidth amount of thetarget node in the target scheduling unit by the increase amountcorresponding to this target scheduling unit and decreasing the carryingbandwidth of the to-be-adjusted node in the target scheduling unit bythe increase amount corresponding to this target scheduling unit; afirst calculating unit, configured for when two or more target nodes areincluded in the target scheduling unit, calculating a second ratio ofavailable bandwidths of the target nodes in the target scheduling unit;a second calculating unit, configured for calculating an adjustmentvalue for each target node in the target scheduling unit based on thecalculated second ratio and the calculated increase amount for thetarget scheduling unit; and a second adjusting unit, configured forincreasing the carrying bandwidth of each target node in the targetscheduling unit by a to-be-adjusted bandwidth amount corresponding tothis target node and decreasing the carrying bandwidth of theto-be-adjusted node in the target scheduling unit by the increase amountcorresponding to the target scheduling unit.
 13. The apparatus accordingto claim 9, wherein the first adjusting module is configured for, foreach to-be-adjusted node, selecting a reference scheduling unit for theto-be-adjusted node from the scheduling units including theto-be-adjusted node by a greedy algorithm, decreasing the total carryingbandwidth amount of the to-be-adjusted node by the to-be-adjustedbandwidth amount corresponding to the to-be-adjusted node and increasinga total carrying bandwidth amount of the reference scheduling unit forthe to-be-adjusted node by the to-be-adjusted bandwidth amountcorresponding to the to-be-adjusted node.
 14. The apparatus according toclaim 9, wherein the first adjusting module comprises: a secondselecting sub-module, configured for, for each to-be-adjusted node,selecting one unselected target scheduling unit from all targetscheduling units of the to-be-adjusted node as a second scheduling unit;a third judging sub-module, configured for determining whether a totalavailable bandwidth amount of the target nodes in the second schedulingunit is greater than a remaining to-be-adjusted bandwidth amount of theto-be-adjusted node, wherein the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node is a difference between theto-be-adjusted bandwidth amount of the to-be-adjusted node and anadjusted bandwidth amount of the to-be-adjusted node; a fourth judgingsub-module, configured for when the total available bandwidth amount ofthe target nodes in the second scheduling unit is greater than theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node,determining whether the remaining to-be-adjusted bandwidth amount of theto-be-adjusted node is greater than a carrying bandwidth of theto-be-adjusted node in the second scheduling unit; a fifth adjustingsub-module, configured for when the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node is less than or equal to the carryingbandwidth of the to-be-adjusted node in the second scheduling unit,increasing the total carrying bandwidth amount of the target nodes inthe second scheduling unit by the remaining to-be-adjusted bandwidthamount of the to-be-adjusted node and decreasing the carrying bandwidthof the to-be-adjusted node in the second scheduling unit by theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node; asixth adjusting sub-module, configured for when the remainingto-be-adjusted bandwidth amount of the to-be-adjusted node is greaterthan the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit, increasing the total carrying bandwidth amount of thetarget nodes in the second scheduling unit by a target value anddecreasing the carrying bandwidth of the to-be-adjusted node in thesecond scheduling unit by the target value; and returning to perform thesecond selecting sub-module, until the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node is zero, wherein the targetvalue is determined based on the carrying bandwidth of theto-be-adjusted node in the second scheduling unit, and is less than orequal to the carrying bandwidth of the to-be-adjusted node in the secondscheduling unit; and a seventh adjusting sub-module, configured for whenthe total available bandwidth amount of the target nodes in the secondscheduling unit is less than or equal to the remaining to-be-adjustedbandwidth amount of the to-be-adjusted node, increasing the totalcarrying bandwidth amount of the target nodes in the second schedulingunit by the total available bandwidth amount of the target nodes in thesecond scheduling unit and decreasing the carrying bandwidth of theto-be-adjusted node in the second scheduling unit by the total availablebandwidth amount of the target nodes in the second scheduling unit; andreturning to perform the second selecting sub-module, until theremaining to-be-adjusted bandwidth amount of the to-be-adjusted node iszero.
 15. The apparatus according to claim 14, wherein, the secondselecting sub-module is configured for, for each to-be-adjusted node,selecting one target scheduling unit that is not currently selected andis at a foremost position in the target scheduling units ordered in apreset manner, as the second scheduling unit, wherein the preset mannerindicates ordering the scheduling units in a descending order based ontotal available bandwidth amounts of the target nodes and usedbandwidths of the to-be-adjusted node in the target scheduling units.16. The apparatus according to claim 9, wherein, the executable modulesfurther comprise: a second judging module, configured for, when theoverload bandwidth of the overload node is greater than the totalcurrent available bandwidth amount of all of the target nodes for theoverload node and when the overload bandwidth of the overload node isgreater than a total reference available bandwidth amount of theoverload node, determining whether the overload bandwidth of theoverload node is within a preset tolerance interval for the overloadnode, wherein the tolerance interval is determined by a preset secondbandwidth threshold corresponding to the overload node and the presetfirst bandwidth threshold corresponding to the overload node; a thirdjudging module, configured for when the overload bandwidth of theoverload node is not within the preset tolerance interval for theoverload node, determining whether a target bandwidth of the overloadnode is greater than the total available bandwidth amount of all of thetarget nodes for the overload node, wherein the target bandwidth of theoverload node is a difference between the total used bandwidth amount ofthe overload node and the preset second bandwidth thresholdcorresponding to the overload node; and a second adjusting module,configured for when the target bandwidth of the overload node is greaterthan the total available bandwidth amount of the target nodes for theoverload node, decreasing a total carrying bandwidth amount of thetarget nodes for the overload node in a third scheduling unit(s) by thetarget bandwidth, increasing a total carrying bandwidth amount of areference node(s) in the third scheduling unit(s) by the targetbandwidth, decreasing the total carrying bandwidth amount of theoverload node in the target scheduling unit for the overload node by thetarget bandwidth, and increasing the total carrying bandwidth amount ofthe target nodes for the overload node in the target scheduling unit bythe target bandwidth, wherein the third scheduling unit(s) is ascheduling unit(s) that includes the target nodes for the overload node,except for the target scheduling units including the overload node; thereference node(s) is a node(s) other than the target nodes for theoverload node and the overload node in the third scheduling unit(s). 17.An electronic device comprising a processor and a memory, wherein, thememory is configured to store a computer program; the processor isconfigured to perform the method according to claim 1 when executing theprogram stored in the memory.
 18. A non-transitory computer-readablestorage medium, wherein a computer program is stored in thecomputer-readable storage medium, and the computer program is executedby a processor to cause the processor to perform the method according toclaim 1.